summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r--cpukit/posix/src/pthreadcreate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index 3185ab6553..fc07b1f7e1 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -74,6 +74,7 @@ int pthread_create(
struct sched_param schedparam;
Objects_Name name;
int rc;
+ ISR_Level level;
if ( !start_routine )
return EFAULT;
@@ -246,10 +247,13 @@ int pthread_create(
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
- _Watchdog_Insert_ticks(
+ _ISR_Disable( level );
+ _Watchdog_Per_CPU_insert_relative(
&api->Sporadic_timer,
+ _Per_CPU_Get(),
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
);
+ _ISR_Enable( level );
}
_Thread_Enable_dispatch();