RTEMS: cpukit/include/rtems/posix/timer.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1
10/*
11 * COPYRIGHT (c) 1989-2011.
12 * On-Line Applications Research Corporation (OAR).
13 *
14 * The license and distribution terms for this file may be
15 * found in the file LICENSE in this distribution or at
16 * http://www.rtems.org/license/LICENSE.
17 */
18
19#ifndef _RTEMS_POSIX_TIMER_H
20#define _RTEMS_POSIX_TIMER_H
21
22#include <rtems/score/objectdata.h>
23#include <rtems/score/watchdog.h>
24
25#include <pthread.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
38/*
39 * Data for a timer
40 */
41 typedef struct {
42 Objects_Control Object;
43 Watchdog_Control Timer; /* Internal Timer */
44 pthread_t thread_id; /* Thread identifier */
45 char state; /* State of the timer */
46 struct sigevent inf; /* Information associated to the timer */
47 struct itimerspec timer_data; /* Timing data of the timer */
48 uint32_t ticks; /* Number of ticks of the initialization */
49 uint32_t overrun; /* Number of expirations of the timer */
50 struct timespec time; /* Time at which the timer was started */
51} POSIX_Timer_Control;
52
56extern Objects_Information _POSIX_Timer_Information;
57
66#define POSIX_TIMER_INFORMATION_DEFINE( max ) \
67 OBJECTS_INFORMATION_DEFINE( \
68 _POSIX_Timer, \
69 OBJECTS_POSIX_API, \
70 OBJECTS_POSIX_TIMERS, \
71 POSIX_Timer_Control, \
72 max, \
73 OBJECTS_NO_STRING_NAME, \
74 NULL \
75 )
76
79#ifdef __cplusplus
80}
81#endif
82
83#endif
84/* end of include file */
watchdog.h
Constants and Structures Associated with Watchdog Timers.
_POSIX_Timer_Information
Objects_Information _POSIX_Timer_Information
The POSIX Timer objects information.
objectdata.h
Object Handler Data Structures.
pthread.h
POSIX Threads Private Support.
Objects_Control
Definition: objectdata.h:39
Objects_Information
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
POSIX_Timer_Control
Definition: timer.h:41
Watchdog_Control
The control block used to manage each watchdog timer.
Definition: watchdog.h:90