Ignore:
Timestamp:
Oct 4, 2018, 11:50:21 PM (3 years ago)
Author:
alain
Message:

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_exit.c

    r506 r566  
    4747    cxy_t       parent_cxy;        // parent process cluster
    4848    process_t * parent_ptr;        // local pointer on parent process
    49     xptr_t      children_lock_xp;  // extended pointer on children locki
    5049    thread_t  * parent_main_ptr;   // local pointer on parent main thread
    5150    xptr_t      parent_main_xp;    // extended pointer on parent main thread
     
    7271#if (DEBUG_SYS_EXIT & 1)
    7372if( DEBUG_SYS_EXIT < tm_start )
    74 printk("\n[DBG] %s : thread %x in process %x get owner process %x in cluster %x\n",
    75 __FUNCTION__, this->trdid, process->pid, owner_ptr, owner_cxy );
     73printk("\n[DBG] %s : thread %x in process %x get owner process in cluster %x\n",
     74__FUNCTION__, this->trdid, process->pid, owner_cxy );
    7675#endif
    7776
    78     // get local pointer on the process main thread
     77    // get local pointer on the main thread
    7978    main_ptr  = hal_remote_lpt( XPTR( owner_cxy , &owner_ptr->th_tbl[0] ) );
    8079
     
    8685#if (DEBUG_SYS_EXIT & 1)
    8786if( DEBUG_SYS_EXIT < tm_start )
    88 printk("\n[DBG] %s : thread %x in process %x get parent process %x in cluster %x\n",
    89 __FUNCTION__, this->trdid, process->pid, parent_ptr, parent_cxy );
     87printk("\n[DBG] %s : thread %x in process %x get parent process in cluster %x\n",
     88__FUNCTION__, this->trdid, process->pid, parent_cxy );
    9089#endif
    91 
    92     // get extended pointer on lock protecting children list in parent process
    93     children_lock_xp = XPTR( parent_cxy , &parent_ptr->children_lock );
    9490
    9591    // get pointers on the parent process main thread
     
    118114#endif
    119115
    120     // mark for delete this calling thread when it is not the main
     116    // mark for delete the calling thread when it is not the main
    121117    if( (owner_cxy != local_cxy) || (main_ptr != this) )
    122118    {
     
    151147
    152148    // unblock the parent process main thread
    153     remote_spinlock_lock( children_lock_xp );
    154149    thread_unblock( parent_main_xp , THREAD_BLOCKED_WAIT );
    155     remote_spinlock_unlock( children_lock_xp );
    156150
    157151#if( DEBUG_SYS_EXIT & 1)
    158152if( tm_start > DEBUG_SYS_EXIT )
    159 printk("\n[DBG] %s : thread %x in process %x unblock parent main thread in process %x\n",
     153printk("\n[DBG] %s : thread %x in process %x unblocked parent main thread in process %x\n",
    160154__FUNCTION__ , this->trdid, process->pid,
    161 hal_remote_lw( XPTR( parent_cxy , &parent_ptr->pid) ) );
     155hal_remote_l32( XPTR( parent_cxy , &parent_ptr->pid) ) );
    162156#endif
    163157
Note: See TracChangeset for help on using the changeset viewer.