diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-15 08:50:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-15 08:55:18 +0200 |
commit | 5d65d0ddaf66cb621a5656c4dc6ccd1dfcc7afb4 (patch) | |
tree | 14cc47ab2ff0886ac680bf2bcfb58b96b15f1e0d /cpukit/posix/include/rtems/posix | |
parent | posix: Remove superfluous code (diff) | |
download | rtems-5d65d0ddaf66cb621a5656c4dc6ccd1dfcc7afb4.tar.bz2 |
posix: Use _POSIX_Threads_Sporadic_timer_insert()
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/pthreadimpl.h | 15 |
1 files changed, 14 insertions, 1 deletions
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 <rtems/posix/pthread.h> #include <rtems/posix/config.h> #include <rtems/posix/threadsup.h> +#include <rtems/score/assert.h> #include <rtems/score/objectimpl.h> +#include <rtems/score/timespec.h> #include <rtems/score/threadimpl.h> -#include <rtems/score/assert.h> +#include <rtems/score/watchdogimpl.h> #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. * |