Changeset 676 for trunk/user/init
- Timestamp:
- Nov 20, 2020, 12:11:35 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/init/init.c
r659 r676 20 20 #include <shared_syscalls.h> 21 21 22 #define DEBUG_PROCESS_INIT 122 #define DEBUG_PROCESS_INIT 0 23 23 24 24 //////////////// … … 36 36 #endif 37 37 38 // get Number of TXT channels from hard configuration38 // get number of TXT channels from hard configuration 39 39 hard_config_t config; 40 40 41 get_config( &config ); 41 42 42 43 unsigned int txt_channels = config.txt_channels; 43 unsigned int x_size = config.x_size;44 unsigned int y_size = config.y_size;45 unsigned int ncores = config.ncores;46 44 47 45 // check number of TXT channels … … 49 47 { 50 48 snprintf( string , 64 , 51 "\n[init ERROR] number of TXT channels must be larger than 1 \n");49 "\n[init ERROR] number of TXT channels must be larger than 1"); 52 50 display_string( string ); 53 51 exit( EXIT_FAILURE ); … … 64 62 // INIT display error message 65 63 snprintf( string , 64 , 66 " [init ERROR] cannot fork child[%d] => suicide" , i );64 "\n[init ERROR] cannot fork child[%d] => suicide" , i ); 67 65 display_string( string ); 68 66 … … 72 70 else if( ret_fork == 0 ) // we are in CHILD[i] process 73 71 { 72 73 #if DEBUG_PROCESS_INIT 74 snprintf( string , 64 , 75 "\n[init] CHILD[%d] process forked / call execve", i ); 76 display_string( string ); 77 #endif 74 78 // CHILD[i] process exec process KSH[i] 75 79 ret_exec = execve( "/bin/user/ksh.elf" , NULL , NULL ); … … 79 83 // CHILD[i] display error message 80 84 snprintf( string , 64 , 81 " [init ERROR] CHILD[%d] cannot exec KSH / ret_exec = %d" , i , ret_exec);85 "\n[init ERROR] CHILD[%d] cannot exec KSH" , i ); 82 86 display_string( string ); 83 87 … … 90 94 // INIT display CHILD[i] process PID 91 95 snprintf( string , 64 , 92 " [init] (pid 0x1) createdksh[%d] (pid %x)", i , ret_fork );96 "\n[init] (pid 0x1) create ksh[%d] (pid %x)", i , ret_fork ); 93 97 display_string( string ); 94 98 … … 104 108 unsigned int cxy; // cluster identifier 105 109 unsigned int lid; // core local index 110 111 unsigned int x_size = config.x_size; 112 unsigned int y_size = config.y_size; 113 unsigned int ncores = config.ncores; 106 114 107 115 // INIT displays processes and threads in all clusters
Note: See TracChangeset
for help on using the changeset viewer.