5
Last change
on this file since 21275b58 was
2e71aa41,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/16 at 11:52:17
|
score: Simplify _Watchdog_Tick()
Move thread dispatch disable check to legacy rtems_clock_tick(). Assert
that thread dispatching is disabled in _Watchdog_Tick(). This is
usually the case, since this function is called in interrupt context by
the clock tick service routine.
|
-
Property mode set to
100644
|
File size:
815 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Announce a Clock Tick |
---|
5 | * @ingroup ClassicClock |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2009. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/rtems/clock.h> |
---|
22 | #include <rtems/score/timecounter.h> |
---|
23 | #include <rtems/score/threadimpl.h> |
---|
24 | |
---|
25 | rtems_status_code rtems_clock_tick( void ) |
---|
26 | { |
---|
27 | ISR_lock_Context lock_context; |
---|
28 | |
---|
29 | _Timecounter_Acquire( &lock_context ); |
---|
30 | _Timecounter_Tick_simple( |
---|
31 | rtems_configuration_get_microseconds_per_tick(), |
---|
32 | 0, |
---|
33 | &lock_context |
---|
34 | ); |
---|
35 | |
---|
36 | if ( _Thread_Dispatch_is_enabled() ) { |
---|
37 | _Thread_Dispatch(); |
---|
38 | } |
---|
39 | |
---|
40 | return RTEMS_SUCCESSFUL; |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.