30 #include <rtems/sysinit.h> 46 the_timer->
stop_time = _Timer_Get_CPU_ticks( cpu );
63 the_timer = _Timer_Get(
id, &lock_context );
64 if ( the_timer != NULL ) {
67 cpu = _Timer_Acquire_critical( the_timer, &lock_context );
68 _Timer_Cancel( cpu, the_timer );
74 the_timer->
start_time = _Timer_Get_CPU_ticks( cpu );
76 if ( _Timer_Is_interval_class( the_class ) ) {
90 _Timer_Release( cpu, &lock_context );
163 the_timer->
stop_time = _Timer_Get_CPU_ticks( cpu );
165 &cpu->
Watchdog.
Header[ _Timer_Watchdog_header_index( the_class ) ],
168 }
else if ( _Timer_Is_on_task_class( the_class ) ) {
173 _Assert( timer_server != NULL );
174 _Timer_server_Acquire_critical( timer_server, &lock_context );
181 _Timer_server_Release_critical( timer_server, &lock_context );
219 static void _Timer_Manager_initialization(
void )
225 _Timer_Manager_initialization,
226 RTEMS_SYSINIT_CLASSIC_TIMER,
227 RTEMS_SYSINIT_ORDER_MIDDLE
union Watchdog_Control::@33 Node
Nodes for the watchdog.
This status code indicates you have attempted to create too many instances of a particular object cla...
static __inline__ void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
static __inline__ bool _TOD_Is_set(void)
Check if the TOD is Set.
This header file defines support services of the API.
Watchdog_Service_routine(* Watchdog_Service_routine_entry)(Watchdog_Control *)
Pointer to a watchdog service routine.
Index for realtime clock per-CPU watchdog header.
The watchdog is inactive.
This header file defines the Clock Manager API.
Watchdog_Header Header[PER_CPU_WATCHDOG_COUNT]
Header for watchdogs.
void _Watchdog_Insert(Watchdog_Header *header, Watchdog_Control *the_watchdog, uint64_t expire)
Inserts a watchdog into the set of scheduled watchdogs according to the specified expiration time...
Watchdog_Interval stop_time
#define TIMER_CLASS_BIT_TIME_OF_DAY
%
uint32_t rtems_name
This type is used to represent a Classic API object name.
Inlined Routines in the Watchdog Handler.
void _Objects_Initialize_information(Objects_Information *information)
Initializes the specified objects information.
static __inline__ Watchdog_State _Watchdog_Get_state(const Watchdog_Control *the_watchdog)
Gets the state of the watchdog.
uint64_t ticks
Protects all watchdog operations on this processor.
Objects_Information _Timer_Information
The Classic Timer objects information.
The control block used to manage each watchdog timer.
static bool rtems_is_name_valid(rtems_status_code name)
Returns true, if the specified object name is valid, otherwise returns false.
Classic Timer Implementation.
void _Watchdog_Remove(Watchdog_Header *header, Watchdog_Control *the_watchdog)
In the case the watchdog is scheduled, then it is removed from the set of scheduled watchdogs...
This status code indicates that a specified number was invalid.
rtems_timer_service_routine_entry routine
Chain_Node Chain
this field is a chain node structure and allows this to be placed on a chain used to manage pending w...
This header file defines the status codes and support functions of the Classic API.
static __inline__ bool _Watchdog_Is_scheduled(const Watchdog_Control *the_watchdog)
Checks if the watchdog is scheduled.
static __inline__ void _Watchdog_Preinitialize(Watchdog_Control *the_watchdog, Per_CPU_Control *cpu)
Pre-initializes a watchdog.
Information for the Assert Handler.
static __inline__ Timer_Control * _Timer_Allocate(void)
Timer_Allocate.
#define RTEMS_CONTAINER_OF(_m, _type, _member_name)
Returns the pointer to the container of a specified member pointer.
This status code indicates successful completion.
Watchdog_Interval _TOD_To_seconds(const rtems_time_of_day *the_tod)
%
This type is used to represent the calendar time in the Classic API.
static __inline__ void _Objects_Open(Objects_Information *information, Objects_Control *the_object, Objects_Name name)
Places the_object control pointer and object name in the Local Pointer and Local Name Tables...
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
static __inline__ Per_CPU_Control * _Watchdog_Get_CPU(const Watchdog_Control *the_watchdog)
Gets the watchdog's cpu.
static __inline__ uint64_t _Watchdog_Ticks_from_seconds(uint32_t seconds)
Converts the seconds to ticks.
Timer_server_Control *volatile _Timer_server
Pointer to default timer server control block.
This status code indicates that a specified date/time was invalid.
struct Per_CPU_Control::@13 Watchdog
Watchdog state for this processor.
static __inline__ void _Chain_Extract_unprotected(Chain_Node *the_node)
Extracts this node (unprotected).
#define RTEMS_STATIC_ASSERT(_cond, _msg)
Asserts at compile time that the specified condition is satisfied.
The watchdog is on a chain of pending watchdogs.
static __inline__ void _Watchdog_Initialize(Watchdog_Control *the_watchdog, Watchdog_Service_routine_entry routine)
Initializes a watchdog with a new service routine.
This status code indicates that a specified address was invalid.
Watchdog_Interval rtems_interval
This type is used to represent clock tick intervals.
rtems_status_code rtems_timer_create(rtems_name name, rtems_id *id)
%
This status code indicates that the item has not been initialized.
This status code indicates that an object identifier was invalid.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
static uint32_t _TOD_Seconds_since_epoch(void)
Returns Number of seconds Since RTEMS epoch.
Watchdog_Interval start_time
Local ISR lock context for acquire and release pairs.
Index for tick clock per-CPU watchdog header.
rtems_timer_service_routine(* rtems_timer_service_routine_entry)(rtems_id, void *)
%
This status code indicates that an object name was invalid.
Watchdog_Interval initial
Constants and Structures Related with the Thread Control Block.
static __inline__ void _Watchdog_Set_state(Watchdog_Control *the_watchdog, Watchdog_State state)
Sets the state of the watchdog.
bool _TOD_Validate(const rtems_time_of_day *the_tod)
%
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.