35 #include "osapi/osapi_dll.h"
40 #ifndef osapi_thread_h
63 #define OSAPI_TIMER_PERIODIC (0x1)
68 #define OSAPI_TIMER_ONE_SHOT (0x0)
75 OSAPI_TIMEOUT_OP_AUTOMATIC = 1,
76 OSAPI_TIMEOUT_OP_MANUAL
88 #define OSAPI_TimeoutUserData_INITIALIZER \
94 struct OSAPI_TimerEntry;
95 struct OSAPI_TimeoutHandle
98 struct OSAPI_TimerEntry *_entry;
104 typedef struct OSAPI_TimeoutHandle OSAPI_TimeoutHandle_T;
106 #define OSAPI_TimeoutHandle_INITIALIZER \
120 RTI_INT32 max_entries;
130 struct OSAPI_ThreadProperty thread;
136 #define OSAPI_TimerProperty_INITIALIZER \
141 OSAPI_THREAD_USE_OSDEFAULT_STACKSIZE,\
142 OSAPI_THREAD_PRIORITY_NORMAL,\
143 OSAPI_THREAD_DEFAULT_OPTIONS,\
148 typedef struct OSAPI_Timer *OSAPI_Timer_T;
150 FUNCTION_MUST_TYPEDEF(
156 (*OSAPI_TimerTickHandlerFunction)(OSAPI_Timer_T timer);
180 MUST_CHECK_RETURN OSAPIDllExport OSAPI_Timer_T
209 SHOULD_CHECK_RETURN OSAPIDllExport RTI_BOOL
256 MUST_CHECK_RETURN OSAPIDllExport RTI_BOOL
258 OSAPI_TimeoutHandle_T *out_handle,
259 RTI_INT32 timeout_sec,
260 RTI_INT32 timeout_nsec,
262 OSAPI_TimeoutFunction_T timeout_handler,
297 MUST_CHECK_RETURN OSAPIDllExport RTI_BOOL
299 OSAPI_TimeoutHandle_T *out_handle,
300 RTI_INT32 timeout_sec,
301 RTI_INT32 timeout_nsec);
333 SHOULD_CHECK_RETURN OSAPIDllExport RTI_BOOL
363 MUST_CHECK_RETURN OSAPIDllExport RTI_BOOL
365 OSAPI_TimeoutHandle_T *handle);