Changeset 566 for trunk/kernel/syscalls/sys_exit.c
- Timestamp:
- Oct 4, 2018, 11:50:21 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_exit.c
r506 r566 47 47 cxy_t parent_cxy; // parent process cluster 48 48 process_t * parent_ptr; // local pointer on parent process 49 xptr_t children_lock_xp; // extended pointer on children locki50 49 thread_t * parent_main_ptr; // local pointer on parent main thread 51 50 xptr_t parent_main_xp; // extended pointer on parent main thread … … 72 71 #if (DEBUG_SYS_EXIT & 1) 73 72 if( DEBUG_SYS_EXIT < tm_start ) 74 printk("\n[DBG] %s : thread %x in process %x get owner process %xin cluster %x\n",75 __FUNCTION__, this->trdid, process->pid, owner_ ptr, owner_cxy );73 printk("\n[DBG] %s : thread %x in process %x get owner process in cluster %x\n", 74 __FUNCTION__, this->trdid, process->pid, owner_cxy ); 76 75 #endif 77 76 78 // get local pointer on the processmain thread77 // get local pointer on the main thread 79 78 main_ptr = hal_remote_lpt( XPTR( owner_cxy , &owner_ptr->th_tbl[0] ) ); 80 79 … … 86 85 #if (DEBUG_SYS_EXIT & 1) 87 86 if( DEBUG_SYS_EXIT < tm_start ) 88 printk("\n[DBG] %s : thread %x in process %x get parent process %xin cluster %x\n",89 __FUNCTION__, this->trdid, process->pid, parent_ ptr, parent_cxy );87 printk("\n[DBG] %s : thread %x in process %x get parent process in cluster %x\n", 88 __FUNCTION__, this->trdid, process->pid, parent_cxy ); 90 89 #endif 91 92 // get extended pointer on lock protecting children list in parent process93 children_lock_xp = XPTR( parent_cxy , &parent_ptr->children_lock );94 90 95 91 // get pointers on the parent process main thread … … 118 114 #endif 119 115 120 // mark for delete th iscalling thread when it is not the main116 // mark for delete the calling thread when it is not the main 121 117 if( (owner_cxy != local_cxy) || (main_ptr != this) ) 122 118 { … … 151 147 152 148 // unblock the parent process main thread 153 remote_spinlock_lock( children_lock_xp );154 149 thread_unblock( parent_main_xp , THREAD_BLOCKED_WAIT ); 155 remote_spinlock_unlock( children_lock_xp );156 150 157 151 #if( DEBUG_SYS_EXIT & 1) 158 152 if( tm_start > DEBUG_SYS_EXIT ) 159 printk("\n[DBG] %s : thread %x in process %x unblock parent main thread in process %x\n",153 printk("\n[DBG] %s : thread %x in process %x unblocked parent main thread in process %x\n", 160 154 __FUNCTION__ , this->trdid, process->pid, 161 hal_remote_l w( XPTR( parent_cxy , &parent_ptr->pid) ) );155 hal_remote_l32( XPTR( parent_cxy , &parent_ptr->pid) ) ); 162 156 #endif 163 157
Note: See TracChangeset
for help on using the changeset viewer.