summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadimpl.h
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2016-06-09 11:33:15 -0400
committerGedare Bloom <gedare@rtems.org>2016-07-25 12:44:47 -0400
commitf23d4706169d68d3c4e90b297650f89c272716f4 (patch)
tree333bdc4b4be2ec4ad7ee80ee03229759ec60602a /cpukit/score/include/rtems/score/threadimpl.h
parentscore: Fix for RTEMS_DEBUG (diff)
downloadrtems-f23d4706169d68d3c4e90b297650f89c272716f4.tar.bz2
cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 448f38d6fc..478ab3a334 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -1511,7 +1511,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_relative(
_ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context );
- the_thread->Timer.header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ the_thread->Timer.header = &cpu->Watchdog.Header[PER_CPU_WATCHDOG_RELATIVE];
the_thread->Timer.Watchdog.routine = routine;
_Watchdog_Per_CPU_insert_relative( &the_thread->Timer.Watchdog, cpu, ticks );
@@ -1522,20 +1522,23 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_absolute(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Service_routine_entry routine,
- uint64_t expire
+ uint64_t ticks
)
{
ISR_lock_Context lock_context;
_ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context );
- the_thread->Timer.header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
+ the_thread->Timer.header = &cpu->Watchdog.Header[PER_CPU_WATCHDOG_ABSOLUTE];
the_thread->Timer.Watchdog.routine = routine;
- _Watchdog_Per_CPU_insert_absolute( &the_thread->Timer.Watchdog, cpu, expire );
+ _Watchdog_Per_CPU_insert_absolute( &the_thread->Timer.Watchdog, cpu, ticks );
_ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context );
}
+
+
+
RTEMS_INLINE_ROUTINE void _Thread_Timer_remove( Thread_Control *the_thread )
{
ISR_lock_Context lock_context;