Changeset b04ee63 in rtems
- Timestamp:
- 03/01/02 17:49:57 (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 9f9871f
- Parents:
- 49155d9
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/posix/ChangeLog
r49155d9 rb04ee63 1 2002-03-01 Eric Norum <eric.norum@usask.ca> 2 3 * src/pthreadonce.c: Task is not preemptable while running a 4 pthread_once init function. This is slightly less heavy handed 5 than disabling dispatching and seems better than consuming a mutex. 6 1 7 2002-02-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 8 -
c/src/exec/posix/src/pthreadonce.c
r49155d9 rb04ee63 19 19 #include <errno.h> 20 20 21 #include <rtems.h> 21 22 #include <rtems/system.h> 22 23 #include <rtems/score/thread.h> … … 30 31 return EINVAL; 31 32 32 _Thread_Disable_dispatch();33 34 33 if ( !once_control->init_executed ) { 35 once_control->is_initialized = TRUE; 36 once_control->init_executed = TRUE; 37 (*init_routine)(); 34 rtems_mode saveMode; 35 rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 36 if ( !once_control->init_executed ) { 37 once_control->is_initialized = TRUE; 38 once_control->init_executed = TRUE; 39 (*init_routine)(); 40 } 41 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 38 42 } 39 40 _Thread_Enable_dispatch();41 43 return 0; 42 44 } -
cpukit/posix/ChangeLog
r49155d9 rb04ee63 1 2002-03-01 Eric Norum <eric.norum@usask.ca> 2 3 * src/pthreadonce.c: Task is not preemptable while running a 4 pthread_once init function. This is slightly less heavy handed 5 than disabling dispatching and seems better than consuming a mutex. 6 1 7 2002-02-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 8 -
cpukit/posix/src/pthreadonce.c
r49155d9 rb04ee63 19 19 #include <errno.h> 20 20 21 #include <rtems.h> 21 22 #include <rtems/system.h> 22 23 #include <rtems/score/thread.h> … … 30 31 return EINVAL; 31 32 32 _Thread_Disable_dispatch();33 34 33 if ( !once_control->init_executed ) { 35 once_control->is_initialized = TRUE; 36 once_control->init_executed = TRUE; 37 (*init_routine)(); 34 rtems_mode saveMode; 35 rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 36 if ( !once_control->init_executed ) { 37 once_control->is_initialized = TRUE; 38 once_control->init_executed = TRUE; 39 (*init_routine)(); 40 } 41 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 38 42 } 39 40 _Thread_Enable_dispatch();41 43 return 0; 42 44 }
Note: See TracChangeset
for help on using the changeset viewer.