Changeset 445 for trunk/user/init
- Timestamp:
- May 29, 2018, 9:27:23 AM (7 years ago)
- Location:
- trunk/user/init
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/init/Makefile
r444 r445 1 1 ######################################################################### 2 # Makefile for the ALMOS-MKH"init" application2 # Makefile for the "init" application 3 3 ######################################################################### 4 4 … … 11 11 OBJS = build/init.o 12 12 13 INCLUDES = -I. \14 -I../.. \15 -I$(LIBC_INCLUDE) /\16 -I$(LIBPTHREAD_INCLUDE) \13 INCLUDES = -I. \ 14 -I../.. \ 15 -I$(LIBC_INCLUDE) \ 16 -I$(LIBPTHREAD_INCLUDE) \ 17 17 -I$(LIBALMOSMKH_INCLUDE) \ 18 18 -I$(SHARED_INCLUDE) 19 19 20 20 compile : dirs build/init.elf 21 21 22 build/init.elf : $(OBJS) init.ld 22 $(LD) -o $@ -T init.ld $(OBJS) - nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lc -lpthread -lalmos-mkh -lpthread -lc23 $(LD) -o $@ -T init.ld $(OBJS) -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lc -lpthread -lalmosmkh -lpthread -lc 23 24 $(DU) -D $@ > $@.txt 24 25 -
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.