From 974ff40e575af098e4c0de168721333a764ec8ca Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 29 May 1996 16:04:31 +0000 Subject: renamed signal.c to psignal.c to avoid naming problems. added mp stubs to cond.c and mutex.c to eliminate link errors. added pthread_exit to pthread.c --- c/src/exec/posix/src/cond.c | 25 +++++++++++++++++++++++++ c/src/exec/posix/src/mutex.c | 35 +++++++++++++++++++++++++++++++++++ c/src/exec/posix/src/pthread.c | 30 +++++++++++++++++++++++------- c/src/exec/posix/src/time.c | 11 +++++++++++ c/src/exec/posix/src/types.c | 25 +++++++++++++++++++++++++ 5 files changed, 119 insertions(+), 7 deletions(-) (limited to 'c/src/exec/posix/src') diff --git a/c/src/exec/posix/src/cond.c b/c/src/exec/posix/src/cond.c index ce02fd7596..c5c91d20e7 100644 --- a/c/src/exec/posix/src/cond.c +++ b/c/src/exec/posix/src/cond.c @@ -13,6 +13,31 @@ #include #include +/* + * TEMPORARY + */ + +void _POSIX_Condition_variables_MP_Send_process_packet ( + POSIX_Condition_variables_MP_Remote_operations operation, + Objects_Id condition_variables_id, + Objects_Name name, + Objects_Id proxy_id +) +{ + (void) POSIX_MP_NOT_IMPLEMENTED(); +} + +void _POSIX_Condition_variables_MP_Send_extract_proxy( + Thread_Control *the_thread +) +{ + (void) POSIX_MP_NOT_IMPLEMENTED(); +} + +/* + * END OF TEMPORARY + */ + /*PAGE * * The default condition variable attributes structure. diff --git a/c/src/exec/posix/src/mutex.c b/c/src/exec/posix/src/mutex.c index bdf4065314..51ac6e097c 100644 --- a/c/src/exec/posix/src/mutex.c +++ b/c/src/exec/posix/src/mutex.c @@ -13,6 +13,41 @@ #include #include +/* + * TEMPORARY + */ + +void _POSIX_Mutex_MP_Send_process_packet ( + POSIX_Mutex_MP_Remote_operations operation, + Objects_Id mutex_id, + Objects_Name name, + Objects_Id proxy_id +) +{ + (void) POSIX_MP_NOT_IMPLEMENTED(); +} + +void _POSIX_Mutex_MP_Send_object_was_deleted ( + Thread_Control *the_proxy +) +{ + (void) POSIX_MP_NOT_IMPLEMENTED(); +} + +int _POSIX_Mutex_MP_Send_request_packet ( + POSIX_Mutex_MP_Remote_operations operation, + Objects_Id mutex_id, + boolean wait, /* XXX options */ + Watchdog_Interval timeout +) +{ + return POSIX_MP_NOT_IMPLEMENTED(); +} + +/* + * END OF TEMPORARY + */ + /*PAGE * * The default mutex attributes structure. diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index 3a94245c98..cae1bf2380 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -154,8 +154,14 @@ void _POSIX_Threads_Manager_initialization( number_of_initialization_tasks; _POSIX_Threads_User_initialization_tasks = user_tasks; + /* + * There may not be any POSIX initialization threads configured. + */ + +#if 0 if ( user_tasks == NULL || number_of_initialization_tasks == 0 ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL ); +#endif _Objects_Initialize_information( &_POSIX_Threads_Information, @@ -498,18 +504,16 @@ int pthread_attr_setdetachstate( return 0; } -#ifdef NOT_IMPLEMENTED_YET - /*PAGE * * 16.1.2 Thread Creation, P1003.1c/Draft 10, p. 144 */ int pthread_create( - pthread_t *thread, - const pthread_attr_t *attr, - void (*start_routine)( void * ), - void *arg + pthread_t *thread, + const pthread_attr_t *attr, + void *(*start_routine)( void * ), + void *arg ) { const pthread_attr_t *local_attr; @@ -535,6 +539,8 @@ int pthread_create( #endif int detachstate; #endif + + return POSIX_NOT_IMPLEMENTED(); } /*PAGE @@ -562,7 +568,17 @@ int pthread_detach( return POSIX_NOT_IMPLEMENTED(); } -#endif +/*PAGE + * + * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150 + */ + +void pthread_exit( + void *value_ptr +) +{ + POSIX_NOT_IMPLEMENTED(); +} /*PAGE * diff --git a/c/src/exec/posix/src/time.c b/c/src/exec/posix/src/time.c index 6c2faf65dc..24642c8757 100644 --- a/c/src/exec/posix/src/time.c +++ b/c/src/exec/posix/src/time.c @@ -17,6 +17,17 @@ (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ (4 * TOD_SECONDS_PER_DAY)) +/* + * _POSIX_Time_Spec_to_interval + */ + +Watchdog_Interval _POSIX_Time_Spec_to_interval( + const struct timespec *time +) +{ + return POSIX_NOT_IMPLEMENTED(); +} + /* * 4.5.1 Get System Time, P1003.1b-1993, p. 91 */ diff --git a/c/src/exec/posix/src/types.c b/c/src/exec/posix/src/types.c index a3ba918a18..f0e5c47740 100644 --- a/c/src/exec/posix/src/types.c +++ b/c/src/exec/posix/src/types.c @@ -7,6 +7,31 @@ #include +/* + * TEMPORARY + */ + +#include + +int POSIX_MP_NOT_IMPLEMENTED() +{ + assert( 0 ); +} + +int POSIX_BOTTOM_REACHED() +{ + assert( 0 ); +} + +int POSIX_NOT_IMPLEMENTED() +{ + assert( 0 ); +} + +/* + * END OF TEMPORARY + */ + #ifdef NOT_IMPLEMENTED_YET /*PAGE -- cgit v1.2.3