Changeset 457 for trunk/user/init
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/init/init.c
r445 r457 50 50 for( i = 1 ; i < NB_TXT_CHANNELS ; i++ ) 51 51 { 52 53 #if DEBUG_PROCESS_INIT 54 snprintf( string , 64 , "[INIT] start child[%d] creation" , i ); 55 display_string( string ); 56 #endif 57 52 58 // INIT process fork process CHILD[i] 53 59 ret_fork = fork(); … … 56 62 { 57 63 // INIT display error message 58 snprintf( string , 64 , "[INIT ] cannot fork child[%d] => suicide" , i );64 snprintf( string , 64 , "[INIT ERROR] cannot fork child[%d] => suicide" , i ); 59 65 display_string( string ); 60 66 … … 77 83 else // we are in INIT process 78 84 { 79 80 81 85 // INIT display CHILD[i] process PID 86 snprintf( string , 64 , "[INIT] created KSH[%d] / pid = %x", i , ret_fork ); 87 display_string( string ); 82 88 } 83 84 // INIT wait CHILD[i] process deletion before creating KSH[i+1]85 // int n;86 // for( n = 0 ; n < 100000 ; n++ ) asm volatile ( "nop" );87 wait( &status );88 89 } 89 90 90 91 #if DEBUG_PROCESS_INIT 92 unsigned int x_size; // number of clusters in a row 93 unsigned int y_size; // number of clusters in a column 94 unsigned int ncores; // number of cores per cluster 95 unsigned int x; // cluster x coordinate 96 unsigned int y; // cluster y coordinate 97 unsigned int cxy; // cluster identifier 98 unsigned int lid; // core local index 91 99 92 unsigned int x_size; // number of clusters in a row 93 unsigned int y_size; // number of clusters in a column 94 unsigned int ncores; // number of cores per cluster 95 unsigned int x; // cluster x coordinate 96 unsigned int y; // cluster y coordinate 97 unsigned int cxy; // cluster identifier 98 unsigned int lid; // core local index 99 100 // get hardware config 101 get_config( &x_size , &y_size , &ncores ); 100 // get hardware config 101 get_config( &x_size , &y_size , &ncores ); 102 102 103 // INIT displays processes and threads in all clusters 104 for( x = 0 ; x < x_size ; x++ ) 103 // INIT displays processes and threads in all clusters 104 for( x = 0 ; x < x_size ; x++ ) 105 { 106 for( y = 0 ; y < y_size ; y++ ) 105 107 { 106 for( y = 0 ; y < y_size ; y++ ) 107 { 108 cxy = CXY_FROM_XY( x , y ); 109 display_cluster_processes( cxy ); 110 for( lid = 0 ; lid < ncores ; lid++ ) 111 { 112 display_sched( cxy , lid ); 113 } 108 cxy = CXY_FROM_XY( x , y ); 109 display_cluster_processes( cxy ); 110 for( lid = 0 ; lid < ncores ; lid++ ) 111 { 112 display_sched( cxy , lid ); 114 113 } 115 114 } 116 115 } 117 116 #endif 118 117
Note: See TracChangeset
for help on using the changeset viewer.