summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-04-17 20:32:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-04-17 20:32:13 +0000
commit0ab34c90a20c03d84cad1b357da8fbc0258be6c0 (patch)
tree7d12c026af64c5f6c33746e8c5681a9a562b2054 /cpukit/posix/src/pthread.c
parent2007-04-17 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-0ab34c90a20c03d84cad1b357da8fbc0258be6c0.tar.bz2
2007-04-17 Joel Sherrill <joel@OARcorp.com>
* itron/Makefile.am, itron/src/eventflags.c, itron/src/fmempool.c, itron/src/itronintr.c, itron/src/itrontime.c, itron/src/network.c, itron/src/port.c, itron/src/sysmgmt.c, itron/src/task.c, itron/src/vmempool.c, posix/Makefile.am, posix/src/pthread.c, rtems/src/taskinitusers.c, rtems/src/tasks.c, sapi/include/confdefs.h, sapi/src/io.c: Various modification to reduce executable size. Most were refactoring of files. Split ITRON API files. Implemented mechanism to avoid initialization task/thread loop being linked in when that style of task initialization was not being used. * itron/src/acp_por.c, itron/src/act_cyc.c, itron/src/cal_por.c, itron/src/chg_iXX.c, itron/src/clr_flg.c, itron/src/cre_flg.c, itron/src/cre_mpf.c, itron/src/cre_mpl.c, itron/src/cre_por.c, itron/src/def_alm.c, itron/src/def_cyc.c, itron/src/def_exc.c, itron/src/def_int.c, itron/src/def_svc.c, itron/src/del_flg.c, itron/src/del_mpf.c, itron/src/del_mpl.c, itron/src/del_por.c, itron/src/dis_int.c, itron/src/dly_tsk.c, itron/src/ena_int.c, itron/src/fwd_por.c, itron/src/get_blf.c, itron/src/get_blk.c, itron/src/get_tim.c, itron/src/get_ver.c, itron/src/itroninittasks.c, itron/src/loc_cpu.c, itron/src/nget_nod.c, itron/src/nget_ver.c, itron/src/nrea_dat.c, itron/src/nwri_dat.c, itron/src/pacp_por.c, itron/src/pcal_por.c, itron/src/pget_blf.c, itron/src/pget_blk.c, itron/src/pol_flg.c, itron/src/ref_alm.c, itron/src/ref_cfg.c, itron/src/ref_cyc.c, itron/src/ref_flg.c, itron/src/ref_iXX.c, itron/src/ref_mpf.c, itron/src/ref_mpl.c, itron/src/ref_por.c, itron/src/ref_sys.c, itron/src/rel_blf.c, itron/src/rel_blk.c, itron/src/ret_int.c, itron/src/ret_tmr.c, itron/src/ret_wup.c, itron/src/rpl_rdv.c, itron/src/set_flg.c, itron/src/set_tim.c, itron/src/tacp_por.c, itron/src/tcal_por.c, itron/src/tget_blf.c, itron/src/tget_blk.c, itron/src/twai_flg.c, itron/src/unl_cpu.c, itron/src/wai_flg.c, posix/src/pthreadinitthreads.c: New files.
Diffstat (limited to 'cpukit/posix/src/pthread.c')
-rw-r--r--cpukit/posix/src/pthread.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 9b04b5bfdf..4863e053fe 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -268,44 +268,9 @@ User_extensions_routine _POSIX_Threads_Exitted_extension(
void _POSIX_Threads_Initialize_user_threads( void )
{
- int status;
- uint32_t index;
- uint32_t maximum;
- posix_initialization_threads_table *user_threads;
- pthread_t thread_id;
- pthread_attr_t attr;
-
- user_threads = _POSIX_Threads_User_initialization_threads;
- maximum = _POSIX_Threads_Number_of_initialization_threads;
-
- if ( !user_threads || maximum == 0 )
- return;
-
- /*
- * Be careful .. if the default attribute set changes, this may need to.
- *
- * Setting the attributes explicitly is critical, since we don't want
- * to inherit the idle tasks attributes.
- */
-
- for ( index=0 ; index < maximum ; index++ ) {
- status = pthread_attr_init( &attr );
- assert( !status );
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- assert( !status );
-
- status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size);
- assert( !status );
-
- status = pthread_create(
- &thread_id,
- &attr,
- user_threads[ index ].thread_entry,
- NULL
- );
- assert( !status );
- }
+ extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
+ if ( _POSIX_Threads_Initialize_user_threads_p )
+ (*_POSIX_Threads_Initialize_user_threads_p)();
}
/*PAGE