Changeset 445 for trunk/user
- Timestamp:
- May 29, 2018, 9:27:23 AM (7 years ago)
- Location:
- trunk/user
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/idbg/Makefile
r444 r445 11 11 OBJS = build/idbg.o 12 12 13 INCLUDES = -I. -I$(LIBC_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) -I$(LIBPTHREAD_INCLUDE) 13 INCLUDES = -I. \ 14 -I$(LIBC_INCLUDE) \ 15 -I$(LIBPTHREAD_INCLUDE) \ 16 -I$(LIBALMOSMKH_INCLUDE) \ 17 -I$(SHARED_INCLUDE) 14 18 15 19 compile: dirs build/idbg.elf 16 20 17 21 build/idbg.elf : $(OBJS) idbg.ld 18 $(LD) -o $@ -T idbg.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lpthread -lc -lalmos-mkh -lc -lpthread -lc -lalmos-mkh -lpthread -lc22 $(LD) -o $@ -T idbg.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lpthread -lc -lalmosmkh -lc -lpthread 19 23 $(DU) -D $@ > $@.txt 20 24 -
trunk/user/idbg/idbg.c
r444 r445 8 8 /////////////////////////////////////////////////////////////////////////////// 9 9 10 11 10 #include <stdlib.h> 12 11 #include <stdio.h> 13 #include <almos -mkh.h>12 #include <almosmkh.h> 14 13 15 14 /////////// -
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 -
trunk/user/ksh/Makefile
r444 r445 1 1 ######################################################################### 2 # Makefile for the ALMOS-MKH "ksh" application2 # Makefile for the "ksh" application # 3 3 ######################################################################### 4 4 5 5 -include ../../params-soft.mk 6 6 7 ifeq ($(ARCH_NAME),) 7 8 $(error Please define in ARCH_NAME parameter in params-soft.mk!) … … 10 11 OBJS = build/ksh.o 11 12 12 INCLUDES = -I. -I$(LIBC_INCLUDE) -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) 13 INCLUDES = -I. \ 14 -I$(LIBC_INCLUDE) \ 15 -I$(LIBPTHREAD_INCLUDE) \ 16 -I$(LIBALMOSMKH_INCLUDE) \ 17 -I$(SHARED_INCLUDE) 13 18 14 19 compile: dirs build/ksh.elf 20 15 21 build/ksh.elf : $(OBJS) ksh.ld 16 $(LD) -o $@ -T ksh.ld $(OBJS) - nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lpthread -lc -lalmos-mkh -lc-lpthread -lc22 $(LD) -o $@ -T ksh.ld $(OBJS) -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lc -lpthread -lalmosmkh -lpthread -lc 17 23 $(DU) -D $@ > $@.txt 18 24 -
trunk/user/ksh/ksh.c
r444 r445 13 13 #include <signal.h> 14 14 #include <unistd.h> 15 #include <almos -mkh.h>15 #include <almosmkh.h> 16 16 17 17 #define CMD_MAX_SIZE (256) // max number of characters in one command … … 320 320 321 321 display_chdev(); 322 } 323 else if( strcmp( argv[1] , "dqdt" ) == 0 ) 324 { 325 if( argc != 2 ) 326 { 327 printf(" usage: display dqdt\n"); 328 return; 329 } 330 331 display_dqdt(); 322 332 } 323 333 else -
trunk/user/pgcd/Makefile
r444 r445 1 1 ############################################################################ 2 # Makefile for the ALMOS-MKH "pgcd" application2 # Makefile for the "pgcd" application # 3 3 ############################################################################ 4 4 … … 11 11 OBJS = build/pgcd.o 12 12 13 INCLUDES = -I. -I$(LIBC_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) -I$(LIBPTHREAD_INCLUDE) 13 INCLUDES = -I. \ 14 -I$(LIBC_INCLUDE) \ 15 -I$(LIBPTHREAD_INCLUDE) \ 16 -I$(LIBALMOSMKH_INCLUDE) \ 17 -I$(SHARED_INCLUDE) 14 18 15 19 compile: dirs build/pgcd.elf 16 20 17 21 build/pgcd.elf : $(OBJS) pgcd.ld 18 $(LD) -o $@ -T pgcd.ld $(OBJS) - nostdlib -L$(LIBC) -L$(LIBALMOSMKH) -L$(LIBPTHREAD) -lalmos-mkh -lc -lalmos-mkh -lpthread -lc22 $(LD) -o $@ -T pgcd.ld $(OBJS) -L$(LIBC) -L$(LIBALMOSMKH) -L$(LIBPTHREAD) -lc -lpthread -lalmosmkh -lpthread -lc 19 23 $(DU) -D $@ > $@.txt 20 24 -
trunk/user/pgcd/pgcd.c
r444 r445 8 8 9 9 10 #include <stdlib.h>11 10 #include <stdio.h> 12 #include <almos -mkh.h>11 #include <almosmkh.h> 13 12 14 13 /////////// … … 20 19 21 20 get_cycle( &cycle ); 22 printf( "\n [PGCD] starts / cycle %d\n", (unsigned int)cycle );21 printf( "\n\n[PGCD] starts / cycle %d\n", (unsigned int)cycle ); 23 22 24 23 while (1) -
trunk/user/sort/Makefile
r444 r445 11 11 OBJS = build/sort.o 12 12 13 INCLUDES = -I. -I$(LIBC_INCLUDE) -I$(LIBPTHREAD_INCLUDE) -I$(LIBALMOSMKH_INCLUDE) -I$(SHARED_INCLUDE) 13 INCLUDES = -I. \ 14 -I$(LIBC_INCLUDE) \ 15 -I$(LIBPTHREAD_INCLUDE) \ 16 -I$(LIBALMOSMKH_INCLUDE) \ 17 -I$(SHARED_INCLUDE) 14 18 15 19 compile: dirs build/sort.elf 16 20 17 21 build/sort.elf : $(OBJS) sort.ld 18 $(LD) -o $@ -T sort.ld $(OBJS) - nostdlib -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lpthread -lalmos-mkh-lc22 $(LD) -o $@ -T sort.ld $(OBJS) -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) -lc -lpthread -lalmosmkh -lpthread -lc 19 23 $(DU) -D $@ > $@.txt 20 24 -
trunk/user/sort/sort.c
r444 r445 25 25 #include <stdlib.h> 26 26 #include <pthread.h> 27 #include <almos -mkh.h>27 #include <almosmkh.h> 28 28 29 29 #define ARRAY_LENGTH 0x400 // 1024 values … … 163 163 bubbleSort( array0, items, items * thread_uid ); 164 164 165 printf("\n[SORT] thread[%d] /stage 0 completed\n", thread_uid );165 printf("\n[SORT] thread[%d] : stage 0 completed\n", thread_uid ); 166 166 167 167 ///////////////////////////////// … … 177 177 if( (thread_uid & ((1<<i)-1)) == 0 ) 178 178 { 179 printf("\n[SORT] thread[%d] /stage %d start\n", thread_uid , i );179 printf("\n[SORT] thread[%d] : stage %d start\n", thread_uid , i ); 180 180 181 181 if((i % 2) == 1) // odd stage … … 197 197 items * thread_uid ); 198 198 199 printf("\n[SORT] thread[%d] /stage %d completed\n", thread_uid , i );199 printf("\n[SORT] thread[%d] : stage %d completed\n", thread_uid , i ); 200 200 } 201 201 … … 328 328 329 329 #if INTERACTIVE_MODE 330 idbg();330 // idbg(); 331 331 #endif 332 332 } … … 336 336 get_cycle( &cycle ); 337 337 printf("\n[SORT] main completes threads create at cycle %d\n", (unsigned int)cycle ); 338 339 // main run also the sort() function340 sort( &arg[main_uid] );341 338 342 339 #if INTERACTIVE_MODE … … 344 341 #endif 345 342 343 // the main thread run also the sort() function 344 sort( &arg[main_uid] ); 345 346 346 // Check result 347 347 int success = 1;
Note: See TracChangeset
for help on using the changeset viewer.