Changeset 443 for trunk/kernel/syscalls/sys_wait.c
- Timestamp:
- May 16, 2018, 4:15:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_wait.c
r440 r443 73 73 } 74 74 75 // get process owner cluster and calling thread trdid75 // get calling process owner cluster 76 76 cxy_t owner_cxy = CXY_FROM_PID( pid ); 77 trdid_t trdid = this->trdid;78 77 79 // wait must be executed by the main thread 78 // get calling thread trdid 79 trdid_t trdid = this->trdid; 80 81 // this function must be executed by the process main thread 80 82 if( (owner_cxy != local_cxy) || (LTID_FROM_TRDID(trdid) != 0) ) 81 83 { … … 113 115 child_state = (int)hal_remote_lw ( XPTR(child_cxy,&child_ptr->term_state)); 114 116 115 // test if child process is terminated,117 // test if this child process is terminated, 116 118 // but termination not yet reported to parent process 117 119 if( ((child_state & PROCESS_TERM_EXIT) || … … 120 122 ((child_state & PROCESS_TERM_WAIT) == 0) ) 121 123 { 122 // get pointer on main thread and PID from child owner process124 // get pointer on child main thread and PID from child owner process 123 125 child_pid = (pid_t) hal_remote_lw (XPTR( child_cxy , &child_ptr->pid )); 124 126 child_thread = (thread_t *)hal_remote_lpt(XPTR( child_cxy , 125 127 &child_ptr->th_tbl[0] )); 126 128 127 // set the PROCESS_FLAG_WAIT in owner child descriptor129 // set the PROCESS_FLAG_WAIT in owner child process descriptor 128 130 hal_remote_atomic_or( XPTR( child_cxy , &child_ptr->term_state ), 129 131 PROCESS_TERM_WAIT );
Note: See TracChangeset
for help on using the changeset viewer.