From 5d65d0ddaf66cb621a5656c4dc6ccd1dfcc7afb4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 15 Jun 2016 08:50:29 +0200 Subject: posix: Use _POSIX_Threads_Sporadic_timer_insert() --- cpukit/posix/include/rtems/posix/pthreadimpl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/include') diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h index 68b605066b..990a842168 100644 --- a/cpukit/posix/include/rtems/posix/pthreadimpl.h +++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h @@ -22,9 +22,11 @@ #include #include #include +#include #include +#include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -51,6 +53,17 @@ extern Thread_Information _POSIX_Threads_Information; */ extern pthread_attr_t _POSIX_Threads_Default_attributes; +RTEMS_INLINE_ROUTINE void _POSIX_Threads_Sporadic_timer_insert( + POSIX_API_Control *api +) +{ + _Watchdog_Per_CPU_insert_relative( + &api->Sporadic_timer, + _Per_CPU_Get(), + _Timespec_To_ticks( &api->Attributes.schedparam.sched_ss_repl_period ) + ); +} + /** * @brief POSIX threads sporadic budget callout. * -- cgit v1.2.3