Changeset 670 for trunk/kernel/syscalls/sys_fork.c
- Timestamp:
- Nov 19, 2020, 11:45:52 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_fork.c
r637 r670 2 2 * sys_fork.c - Kernel function implementing the "fork" system call. 3 3 * 4 * Authors Alain Greiner (2016,2017,2018,2019 )4 * Authors Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 46 46 xptr_t parent_thread_xp; // extended pointer on parent thread descriptor 47 47 pid_t parent_pid; // parent process identifier 48 thread_t * parent_thread_ptr; // local pointer on local parent thread descriptor48 thread_t * parent_thread_ptr; // local pointer on local parent thread 49 49 cxy_t parent_cxy; // parent thread cluster 50 50 51 51 pid_t child_pid; // child process identifier 52 thread_t * child_thread_ptr; // local pointer on remote child thread descriptor52 thread_t * child_thread_ptr; // local pointer on remote child thread 53 53 cxy_t child_cxy; // target cluster for forked child process 54 54 … … 58 58 59 59 error_t error; 60 61 60 62 61 // get pointers on local parent process and thread … … 67 66 parent_cxy = local_cxy; 68 67 69 #if (DEBUG_SYS_FORK || CONFIG_INSTRUMENTATION_SYSCALLS)68 #if DEBUG_SYS_FORK || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS 70 69 uint64_t tm_start = hal_get_cycles(); 71 70 #endif … … 88 87 89 88 #if DEBUG_SYSCALLS_ERROR 90 printk("\n[ERROR] in %s : thread[%x,%x] cannot fork : too much children\n", 89 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 90 printk("\n[ERROR] in %s : thread[%x,%x] / too much children\n", 91 91 __FUNCTION__, parent_pid, parent_thread_ptr->trdid ); 92 92 #endif … … 136 136 137 137 #if DEBUG_SYSCALLS_ERROR 138 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 138 139 printk("\n[ERROR] in %s : thread[%x,%x] cannot fork\n", 139 140 __FUNCTION__, parent_pid, parent_thread_ptr->trdid );
Note: See TracChangeset
for help on using the changeset viewer.