Changeset 625 for trunk/kernel/syscalls/sys_wait.c
- Timestamp:
- Apr 10, 2019, 10:09:39 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_wait.c
r624 r625 2 2 * sys_wait.c - wait termination or blocking of a child process. 3 3 * 4 * Author Alain Greiner (2016,2017,2018 )4 * Author Alain Greiner (2016,2017,2018,2019) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 56 56 uint64_t cycle = hal_get_cycles(); 57 57 if( DEBUG_SYS_WAIT < cycle ) 58 printk("\n[ DBG] %s : thread %x in process %xenter / cycle %d\n",59 __FUNCTION__, this, process->pid, (uint32_t)cycle );58 printk("\n[%s] thread[%x,%x] enter / cycle %d\n", 59 __FUNCTION__, pid, this->trdid, (uint32_t)cycle ); 60 60 #endif 61 61 … … 67 67 68 68 #if DEBUG_SYSCALLS_ERROR 69 printk("\n[ERROR] in %s : status buffer %x unmapped for thread %x in process %x\n",70 __FUNCTION__ , (intptr_t)status, this->trdid , process->pid );69 printk("\n[ERROR] in %s : status buffer %x unmapped for thread[%x,%x]\n", 70 __FUNCTION__ , (intptr_t)status, pid, this->trdid ); 71 71 hal_vmm_display( process , false ); 72 72 #endif … … 86 86 87 87 #if DEBUG_SYSCALLS_ERROR 88 printk("\n[ERROR] in %s : calling thread %xis not thread 0 in owner cluster %x\n",89 __FUNCTION__ , trdid , owner_cxy );88 printk("\n[ERROR] in %s : calling thread[%x,%x] is not thread 0 in owner cluster %x\n", 89 __FUNCTION__ , pid, this->trdid , owner_cxy ); 90 90 #endif 91 91 this->errno = EINVAL; … … 119 119 child_thread = hal_remote_lpt(XPTR( child_cxy , &child_ptr->th_tbl[0] )); 120 120 121 #if (DEBUG_SYS_WAIT & 1)122 cycle = hal_get_cycles();123 if( DEBUG_SYS_WAIT < cycle )124 printk("\n[DBG] %s : thread %x in process %x check child %x / state %x\n",125 __FUNCTION__, this, process->pid, child_pid, child_state );126 #endif127 121 // test if this child process is terminated, 128 122 // but termination not yet reported to parent process … … 148 142 if( DEBUG_SYS_WAIT < cycle ) 149 143 { 150 if 151 printk("\n[ DBG] %s : thread %x in process %x exit / child %x exit/ cycle %d\n",152 __FUNCTION__, this, process->pid, child_pid, (uint32_t)cycle );144 if( child_state & PROCESS_TERM_EXIT ) 145 printk("\n[%s] thread[%x,%x] exit : child process %x terminated / cycle %d\n", 146 __FUNCTION__, pid, this->trdid, child_pid, (uint32_t)cycle ); 153 147 if( child_state & PROCESS_TERM_KILL ) 154 printk("\n[ DBG] %s : thread %x in process %x exit / child%x killed / cycle %d\n",155 __FUNCTION__, this, process->pid, child_pid, (uint32_t)cycle );148 printk("\n[%s] thread[%x,%x] exit : child process %x killed / cycle %d\n", 149 __FUNCTION__, pid, this->trdid, child_pid, (uint32_t)cycle ); 156 150 if( child_state & PROCESS_TERM_STOP ) 157 printk("\n[ DBG] %s : thread %x in process %x exit / child%x stopped / cycle %d\n",158 __FUNCTION__, this, process->pid, child_pid, (uint32_t)cycle );151 printk("\n[%s] thread[%x,%x] exit : child process %x stopped / cycle %d\n", 152 __FUNCTION__, pid, this->trdid, child_pid, (uint32_t)cycle ); 159 153 } 160 154 #endif … … 165 159 } // end loop on children 166 160 167 // we execute this code when no child terminated:161 // we execute this code when no child change detected 168 162 // - release the lock protecting children list, 169 163 // - block on the WAIT condition … … 179 173 cycle = hal_get_cycles(); 180 174 if( DEBUG_SYS_WAIT < cycle ) 181 printk("\n[ DBG] %s : thread %x in process %xblock & deschedule / cycle %d\n",182 __FUNCTION__, this, process->pid, (uint32_t)cycle );175 printk("\n[%s] thread[%x,%x] block & deschedule / cycle %d\n", 176 __FUNCTION__, pid, this->trdid, (uint32_t)cycle ); 183 177 #endif 184 178 … … 189 183 cycle = hal_get_cycles(); 190 184 if( DEBUG_SYS_WAIT < cycle ) 191 printk("\n[ DBG] %s : thread %x in process %x unblock &resume / cycle %d\n",192 __FUNCTION__, this, process->pid, (uint32_t)cycle );185 printk("\n[%s] thread[%x,%x] resume / cycle %d\n", 186 __FUNCTION__, pid, this->trdid, (uint32_t)cycle ); 193 187 #endif 194 188
Note: See TracChangeset
for help on using the changeset viewer.