Changeset 457 for trunk/libs
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (6 years ago)
- Location:
- trunk/libs
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/libalmosmkh/almosmkh.c
r445 r457 24 24 #include <almosmkh.h> 25 25 #include <hal_user.h> 26 #include <hal_ types.h>26 #include <hal_shared_types.h> 27 27 #include <syscalls_numbers.h> 28 28 #include <string.h> … … 39 39 return hal_user_syscall( SYS_FG, 40 40 (reg_t)pid, 0, 0, 0 ); 41 } 42 43 ////////////////////////////// 44 int is_fg( unsigned int pid, 45 unsigned int * owner ) 46 { 47 return hal_user_syscall( SYS_IS_FG, 48 (reg_t)pid, 49 (reg_t)owner, 0, 0 ); 41 50 } 42 51 … … 224 233 ////////////////////////////////// 225 234 int trace( unsigned int active, 226 unsigned int pid,235 unsigned int cxy, 227 236 unsigned int lid ) 228 237 { 229 238 return hal_user_syscall( SYS_TRACE, 230 239 (reg_t)active, 231 (reg_t) pid,240 (reg_t)cxy, 232 241 (reg_t)lid, 0 ); 233 242 } … … 316 325 317 326 318 /////////////// non standard debugfunctions //////////////////////////327 /////////////// non standard malloc functions ////////////////////////// 319 328 320 329 #define MALLOC_DEBUG 0 -
trunk/libs/libalmosmkh/almosmkh.h
r450 r457 26 26 27 27 /*************************************************************************************** 28 * various the user level, ALMOS-MKH specific library. It contains:28 * This file defines an user level, ALMOS-MKH specific library, containing: 29 29 * - non standard system calls. 30 30 * - debug functions. … … 40 40 /*************************************************************************************** 41 41 * This function is used to give the process identified by the <pid> argument the 42 * exclusive ownership of the attached TXT_RXterminal.42 * exclusive ownership of its TXT terminal. 43 43 *************************************************************************************** 44 44 * @ pid : process identifier. … … 46 46 **************************************************************************************/ 47 47 int fg( unsigned int pid ); 48 49 /*************************************************************************************** 50 * This function stores in the buffer identified by the <owner> argument a non zero 51 * value when the process identified by the <pid> argument is currently the exclusive 52 * owner of its TXT terminal. 53 *************************************************************************************** 54 * @ pid : [in] process identifier. 55 * @ owner : [out] pointer on buffer to store the 56 * @ returns O if success / returns -1 if process not found. 57 **************************************************************************************/ 58 int is_fg( unsigned int pid, 59 unsigned int * owner ); 48 60 49 61 /*************************************************************************************** -
trunk/libs/libpthread/Makefile
r445 r457 9 9 endif 10 10 11 SRCS = pthread.c 12 13 OBJS = $(addprefix build/, $(SRCS:.c=.o)) \ 11 OBJS = build/pthread.o \ 14 12 $(HAL_ARCH)/build/core/hal_user.o 15 13 … … 37 35 38 36 headers: build 39 cp $(SRCS:.c=.h)build/include/.37 cp pthread.h build/include/. 40 38 41 39 -
trunk/libs/libpthread/pthread.c
r445 r457 1 1 /* 2 * pthread.c - User leve <pthread> library implementation.2 * pthread.c - User level <pthread> library implementation. 3 3 * 4 4 * Author Alain Greiner (2016,2017,2018) … … 23 23 24 24 #include <hal_user.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <stdio.h> 27 27 #include <stdlib.h> 28 28 #include <pthread.h> 29 #include <shared_pthread.h> 29 30 #include <almosmkh.h> 30 31 #include <syscalls_numbers.h> -
trunk/libs/libpthread/pthread.h
r445 r457 25 25 #define _PTHREAD_H_ 26 26 27 ////////////////////////////////////////////////////////////////////////////////////////////// 28 // POSIX Threads related functions (including barriers and mutexes) 29 ////////////////////////////////////////////////////////////////////////////////////////////// 30 27 31 #include <shared_pthread.h> 28 29 //////////////////////////////////////////////////////////////////////////////////////////////30 // POSIX Threads related functions31 //////////////////////////////////////////////////////////////////////////////////////////////32 32 33 33 /********************************************************************************************* -
trunk/libs/mini-libc/dirent.c
r449 r457 23 23 24 24 #include <dirent.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 27 #include <syscalls_numbers.h> -
trunk/libs/mini-libc/fcntl.c
r449 r457 23 23 24 24 #include <fcntl.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 27 #include <syscalls_numbers.h> -
trunk/libs/mini-libc/mman.c
r449 r457 23 23 24 24 #include <mman.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 27 #include <syscalls_numbers.h> -
trunk/libs/mini-libc/signal.c
r449 r457 1 1 /* 2 * signal.c - User side signals related syscallsimplementation.2 * signal.c - User side signals related library implementation. 3 3 * 4 4 * Author Alain Greiner (2016,2017,2018) … … 23 23 24 24 #include <signal.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 27 #include <syscalls_numbers.h> -
trunk/libs/mini-libc/stat.c
r449 r457 1 1 /* 2 * stat.c - User side file stat related syscallsimplementation.2 * stat.c - User side file statistics related library implementation. 3 3 * 4 4 * Author Alain Greiner (2016,2017,2018) … … 24 24 #include <stat.h> 25 25 #include <hal_user.h> 26 #include <hal_ types.h>26 #include <hal_shared_types.h> 27 27 #include <syscalls_numbers.h> 28 28 -
trunk/libs/mini-libc/stdio.c
r445 r457 266 266 if ( count == -1 ) 267 267 { 268 display_string( " stdlib: xprintf failure" );268 display_string( "printf : xprintf failure" ); 269 269 return -1; 270 270 } … … 272 272 { 273 273 string[count] = 0; 274 return write( 1 , &string , count + 1);274 return write( 1 , &string , count ); 275 275 } 276 276 } -
trunk/libs/mini-libc/stdlib.c
r445 r457 23 23 24 24 #include <stdlib.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 #include <syscalls_numbers.h> 27 28 #include <almosmkh.h> 28 29 #include <stdio.h> 29 #include <syscalls_numbers.h>30 30 31 31 ////////////////////////// -
trunk/libs/mini-libc/time.c
r449 r457 24 24 #include <time.h> 25 25 #include <hal_user.h> 26 #include <hal_user.h> 27 #include <hal_types.h> 26 #include <hal_shared_types.h> 28 27 #include <syscalls_numbers.h> 29 28 … … 32 31 struct timezone * tz ) 33 32 { 34 return hal_user_syscall( SYS_TIMEOFDAY, // TODO SYS_SIGNAL ?33 return hal_user_syscall( SYS_TIMEOFDAY, 35 34 (reg_t)tv, 36 35 (reg_t)tz, 0, 0 ); -
trunk/libs/mini-libc/unistd.c
r449 r457 23 23 24 24 #include <unistd.h> 25 #include <hal_ types.h>25 #include <hal_shared_types.h> 26 26 #include <hal_user.h> 27 27 #include <syscalls_numbers.h> -
trunk/libs/mini-libc/wait.c
r449 r457 24 24 #include <wait.h> 25 25 #include <hal_user.h> 26 #include <hal_ types.h>26 #include <hal_shared_types.h> 27 27 #include <syscalls_numbers.h> 28 28 -
trunk/libs/mini-libc/wait.h
r449 r457 37 37 * This blocking function returns only when one child process of the calling process 38 38 * changes state (from RUNNING to STOPPED / EXITED / KILLED). It returns the terminating 39 * child process PID, and set in the <status> buffer the newchild process state.39 * child process PID, and set in the <status> buffer the terminating child process state. 40 40 ***************************************************************************************** 41 * @ status : [out] terminating child process state.41 * @ status : [out] pointer on buffer for terminating child process state. 42 42 * @ returns terminating child process pid. 43 43 ****************************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.