Changeset 5d65d0dd in rtems


Ignore:
Timestamp:
Jun 15, 2016, 6:50:29 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d6467102
Parents:
d07f582
git-author:
Sebastian Huber <sebastian.huber@…> (06/15/16 06:50:29)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/15/16 06:55:18)
Message:

posix: Use _POSIX_Threads_Sporadic_timer_insert()

Location:
cpukit/posix
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/pthreadimpl.h

    rd07f582 r5d65d0dd  
    2323#include <rtems/posix/config.h>
    2424#include <rtems/posix/threadsup.h>
     25#include <rtems/score/assert.h>
    2526#include <rtems/score/objectimpl.h>
     27#include <rtems/score/timespec.h>
    2628#include <rtems/score/threadimpl.h>
    27 #include <rtems/score/assert.h>
     29#include <rtems/score/watchdogimpl.h>
    2830
    2931#ifdef __cplusplus
     
    5153 */
    5254extern pthread_attr_t _POSIX_Threads_Default_attributes;
     55
     56RTEMS_INLINE_ROUTINE void _POSIX_Threads_Sporadic_timer_insert(
     57  POSIX_API_Control *api
     58)
     59{
     60  _Watchdog_Per_CPU_insert_relative(
     61    &api->Sporadic_timer,
     62    _Per_CPU_Get(),
     63    _Timespec_To_ticks( &api->Attributes.schedparam.sched_ss_repl_period )
     64  );
     65}
    5366
    5467/**
  • cpukit/posix/src/pthread.c

    rd07f582 r5d65d0dd  
    3232#include <rtems/score/threadqimpl.h>
    3333#include <rtems/score/userextimpl.h>
    34 #include <rtems/score/watchdogimpl.h>
    3534#include <rtems/score/wkspace.h>
    3635#include <rtems/posix/pthreadimpl.h>
     
    3938#include <rtems/posix/config.h>
    4039#include <rtems/posix/keyimpl.h>
    41 #include <rtems/score/timespec.h>
    4240#include <rtems/score/cpusetimpl.h>
    4341#include <rtems/score/assert.h>
     
    120118
    121119  _Watchdog_Per_CPU_remove_relative( &api->Sporadic_timer );
    122   _Watchdog_Per_CPU_insert_relative(
    123     &api->Sporadic_timer,
    124     _Per_CPU_Get(),
    125     _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
    126   );
     120  _POSIX_Threads_Sporadic_timer_insert( api );
    127121
    128122  new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
  • cpukit/posix/src/pthreadcreate.c

    rd07f582 r5d65d0dd  
    3232#include <rtems/score/apimutex.h>
    3333#include <rtems/score/stackimpl.h>
    34 #include <rtems/score/watchdogimpl.h>
    3534#include <rtems/score/schedulerimpl.h>
    36 
    3735
    3836static inline size_t _POSIX_Threads_Ensure_minimum_stack (
     
    254252  if ( schedpolicy == SCHED_SPORADIC ) {
    255253    _ISR_lock_ISR_disable( &lock_context );
    256     _Watchdog_Per_CPU_insert_relative(
    257       &api->Sporadic_timer,
    258       _Per_CPU_Get(),
    259       _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
    260     );
     254    _POSIX_Threads_Sporadic_timer_insert( api );
    261255    _ISR_lock_ISR_enable( &lock_context );
    262256  }
Note: See TracChangeset for help on using the changeset viewer.