[rtems commit] score: Format
Sebastian Huber
sebh at rtems.org
Tue Jul 26 05:54:32 UTC 2016
Module: rtems
Branch: master
Commit: 00c620c1a1a8f738a69106c5f0d1a36449cf1a32
Changeset: http://git.rtems.org/rtems/commit/?id=00c620c1a1a8f738a69106c5f0d1a36449cf1a32
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 26 07:53:34 2016 +0200
score: Format
---
cpukit/score/include/rtems/score/threadimpl.h | 13 +++++-----
cpukit/score/include/rtems/score/watchdogimpl.h | 32 ++++++++++++-------------
2 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 478ab3a..ec82b91 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -1511,7 +1511,8 @@ 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,23 +1523,21 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_absolute(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Service_routine_entry routine,
- uint64_t ticks
+ uint64_t expire
)
{
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, ticks );
+ _Watchdog_Per_CPU_insert_absolute( &the_thread->Timer.Watchdog, cpu, expire );
_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;
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index 0900a1b..7253dc4 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -340,42 +340,40 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_release_critical(
}
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
- Watchdog_Control *the_watchdog,
- Per_CPU_Control *cpu,
- Watchdog_Interval ticks
+ Watchdog_Control *the_watchdog,
+ Per_CPU_Control *cpu,
+ Watchdog_Interval ticks
)
{
- ISR_lock_Context lock_context;
- Watchdog_Header *header;
- uint64_t expire;
+ ISR_lock_Context lock_context;
+ Watchdog_Header *header;
+ uint64_t expire;
+
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
_Watchdog_Set_CPU( the_watchdog, cpu );
_Watchdog_Per_CPU_acquire_critical( cpu, &lock_context );
-
expire = ticks + cpu->Watchdog.ticks;
- header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
-
_Watchdog_Insert(header, the_watchdog, expire);
_Watchdog_Per_CPU_release_critical( cpu, &lock_context );
return expire;
}
RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_absolute(
- Watchdog_Control *the_watchdog,
- Per_CPU_Control *cpu,
- uint64_t expire
+ Watchdog_Control *the_watchdog,
+ Per_CPU_Control *cpu,
+ uint64_t expire
)
{
- ISR_lock_Context lock_context;
- Watchdog_Header *header;
+ ISR_lock_Context lock_context;
+ Watchdog_Header *header;
+
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
_Watchdog_Set_CPU( the_watchdog, cpu );
_Watchdog_Per_CPU_acquire_critical( cpu, &lock_context );
-
- header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
-
_Watchdog_Insert(header, the_watchdog, expire);
_Watchdog_Per_CPU_release_critical( cpu, &lock_context );
return expire;
More information about the vc
mailing list