28 #include "osapi/osapi_dll.h"
33 #ifndef osapi_thread_h
56 #define OSAPI_TIMER_PERIODIC (0x1)
61 #define OSAPI_TIMER_ONE_SHOT (0x0)
68 OSAPI_TIMEOUT_OP_AUTOMATIC = 1,
69 OSAPI_TIMEOUT_OP_MANUAL
81 struct OSAPI_TimerEntry;
82 struct OSAPI_TimeoutHandle
85 struct OSAPI_TimerEntry *_entry;
91 typedef struct OSAPI_TimeoutHandle OSAPI_TimeoutHandle_T;
93 #define OSAPI_TimeoutHandle_INITIALIZER \
99 struct OSAPI_TimerProperty
101 RTI_INT32 max_entries;
103 struct OSAPI_ThreadProperty thread;
106 #define OSAPI_TimerProperty_INITIALIZER \
112 OSAPI_THREAD_PRIORITY_NORMAL,\
113 OSAPI_THREAD_DEFAULT_OPTIONS,\
118 typedef struct OSAPI_Timer *OSAPI_Timer_T;
120 FUNCTION_MUST_TYPEDEF(
126 (*OSAPI_TimerTickHandlerFunction)(OSAPI_Timer_T timer);
151 MUST_CHECK_RETURN OSAPIDllExport OSAPI_Timer_T
152 OSAPI_Timer_new(
struct OSAPI_TimerProperty *property,
struct OSAPI_Mutex *mutex);
177 SHOULD_CHECK_RETURN OSAPIDllExport
RTI_BOOL
220 MUST_CHECK_RETURN OSAPIDllExport
RTI_BOOL
222 OSAPI_TimeoutHandle_T * out_handle,
225 OSAPI_TimeoutFunction_T timeout_handler,
259 MUST_CHECK_RETURN OSAPIDllExport
RTI_BOOL
261 OSAPI_TimeoutHandle_T *out_handle, RTI_INT32 timeout);
291 SHOULD_CHECK_RETURN OSAPIDllExport
RTI_BOOL
321 MUST_CHECK_RETURN OSAPIDllExport
RTI_BOOL
323 OSAPI_TimeoutHandle_T *handle);