Changeset 441 for trunk/kernel/syscalls/sys_exec.c
- Timestamp:
- May 9, 2018, 3:13:56 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_exec.c
r438 r441 150 150 // Implementation note: 151 151 // This function must be called by the main thread (thread 0 in owner cluster). 152 // I Tbuild an exec_info_t structure containing all informations152 // It build an exec_info_t structure containing all informations 153 153 // required to initialize the new process descriptor and the associated thread. 154 154 // It includes the process main() arguments, the environment variables, … … 208 208 tm_start = hal_get_cycles(); 209 209 if( DEBUG_SYS_EXEC < tm_start ) 210 printk("\n[DBG] %s : thread %x enter / process %x / path %s/ cycle = %d\n",210 printk("\n[DBG] %s : thread %x in process %x enter for path <%s> / cycle = %d\n", 211 211 __FUNCTION__, this, pid, exec_info.path, (uint32_t)tm_start ); 212 212 #endif … … 219 219 220 220 #if DEBUG_SYSCALLS_ERROR 221 printk("\n[ERROR] in %s : cannot access args\n", __FUNCTION__ ); 221 printk("\n[ERROR] in %s : thread %x in process %x cannot access args\n", 222 __FUNCTION__ , this, pid ); 222 223 #endif 223 224 this->errno = EINVAL; … … 233 234 234 235 #if DEBUG_SYCALLS_ERROR 235 printk("\n[ERROR] in %s : cannot access envs\n", __FUNCTION__ ); 236 printk("\n[ERROR] in %s : thread %x in process %x cannot access envs\n", 237 __FUNCTION__ , this, pid ); 236 238 #endif 237 239 this->errno = EINVAL; … … 247 249 248 250 #if DEBUG_SYSCALLS_ERROR 249 printk("\n[ERROR] in %s : cannot create process %x in cluster %x\n",250 __FUNCTION__, pid, CXY_FROM_PID(pid));251 printk("\n[ERROR] in %s : thread %x in process %x cannot create process for <%s>\n", 252 __FUNCTION__, this, pid, exec_info.path ); 251 253 #endif 252 254 this->errno = error; … … 257 259 tm_end = hal_get_cycles(); 258 260 if( DEBUG_SYS_EXEC < tm_end ) 259 printk("\n[DBG] %s : thread %x exit / process %x/ cost = %d / cycle %d\n",261 printk("\n[DBG] %s : thread %x in process %x exit / cost = %d / cycle %d\n", 260 262 __FUNCTION__, this, pid, (uint32_t)(tm_end - tm_start), (uint32_t)tm_end ); 261 263 #endif 262 264 263 // deschedule <=> old thread suicide because the BLOCKED_GLOBAL 264 // and the FLAG_REQ_DELETE have been set by process_make_exec() 265 // In case of success, this calling thread deschedules, causing suicide, 266 // because a new process descriptor and its associated main thread 267 // have been created by the process_make_exec() function, and the 268 // BLOCKED_GLOBAL & FLAG_REQ_DELETE bits have been set for the calling thread. 265 269 sched_yield( "old process suicide in sys_exec()" ); 266 270 267 assert( false , __FUNCTION__ , "This code should not be executed\n" );268 269 271 return 0; 270 272
Note: See TracChangeset
for help on using the changeset viewer.