Changeset 445 for trunk/user/init/init.c
- Timestamp:
- May 29, 2018, 9:27:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/init/init.c
r444 r445 17 17 #include <stdio.h> 18 18 #include <pthread.h> 19 #include <almos-mkh.h> 20 #include <assert.h> 19 #include <almosmkh.h> 21 20 #include <sys/wait.h> 22 21 23 22 #define DEBUG_PROCESS_INIT 0 24 23 25 // TODO make the cxy computation portable [AG] 24 // TODO make the cxy computation portable 25 // and avoid this TSAR specific define [AG] 26 26 27 #define CXY_FROM_XY( x , y ) ((x<<4) + y) 28 29 // TODO improve the get_config() syscall to return nb_txt_channels 30 // and avoid the hard_config include [AG] 27 31 28 32 ////////// … … 37 41 38 42 // check number of TXT channels 39 assert( NB_TXT_CHANNELS > 1 ); 43 if( NB_TXT_CHANNELS < 2 ) 44 { 45 printf("\n[ERROR] in init process : number of TXT channels must be larger than 1\n"); 46 exit( EXIT_FAILURE ); 47 } 40 48 41 49 // create the KSH processes (one per user terminal) … … 73 81 display_string( string ); 74 82 } 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 ); 75 88 } 76 89
Note: See TracChangeset
for help on using the changeset viewer.