diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 16:54:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 16:54:52 +0000 |
commit | 613cff6f58129ea3280c763c855e48525e92f1dc (patch) | |
tree | e35504fb42cdeb98512ed16729340807085960a4 /c/src/exec/posix/src/pthread.c | |
parent | added entry point for posix initialization threads to the posix initialization (diff) | |
download | rtems-613cff6f58129ea3280c763c855e48525e92f1dc.tar.bz2 |
removed all ifdef's on NOT_IMPLEMENTED.
Diffstat (limited to 'c/src/exec/posix/src/pthread.c')
-rw-r--r-- | c/src/exec/posix/src/pthread.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c index cae1bf2380..1296af9e70 100644 --- a/c/src/exec/posix/src/pthread.c +++ b/c/src/exec/posix/src/pthread.c @@ -2,6 +2,7 @@ * $Id$ */ +#include <assert.h> #include <errno.h> #include <pthread.h> #include <limits.h> @@ -94,9 +95,11 @@ User_extensions_routine _POSIX_Threads_Delete_extension( void _POSIX_Threads_Initialize_user_tasks( void ) { + int status; unsigned32 index; unsigned32 maximum; posix_initialization_tasks_table *user_tasks; + pthread_t thread_id; /* * NOTE: This is slightly different from the Ada implementation. @@ -104,9 +107,13 @@ void _POSIX_Threads_Initialize_user_tasks( void ) user_tasks = _POSIX_Threads_User_initialization_tasks; maximum = _POSIX_Threads_Number_of_initialization_tasks; + + if ( !user_tasks || maximum == 0 ) + return; for ( index=0 ; index < maximum ; index++ ) { - ; + status = pthread_create(&thread_id, NULL, user_tasks[ index ].entry, NULL); + assert( !status ); } } @@ -130,7 +137,6 @@ User_extensions_Control _POSIX_Threads_User_extensions = { } }; - /*PAGE * * _POSIX_Threads_Manager_initialization @@ -174,7 +180,19 @@ void _POSIX_Threads_Manager_initialization( TRUE ); - /* XXX add api extensions */ + /* + * Add all the extensions for this API + */ + + _User_extensions_Add_API_set( &_POSIX_Threads_User_extensions ); + + _API_extensions_Add( &_POSIX_Threads_API_extensions ); + + /* + * If we supported MP, then here we would ... + * Register the MP Process Packet routine. + */ + } /*PAGE @@ -643,8 +661,6 @@ int pthread_once( return 0; } -#ifdef NOT_IMPLEMENTED_YET - /*PAGE * * 20.1.6 Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58 @@ -658,8 +674,6 @@ int pthread_getcpuclockid( return POSIX_NOT_IMPLEMENTED(); } -#endif - /*PAGE * * 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/D8, p. 59 |