28 #ifndef INC_KERNEL_OC_SEMAPHORE_H_ 29 #define INC_KERNEL_OC_SEMAPHORE_H_ 34 #include <oc_stdlib.h> 41 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 49 oC_Semaphore_Type_Binary = 1 ,
50 oC_Semaphore_Type_Counting = 0xFFFFFFFF
51 } oC_Semaphore_Type_t;
55 oC_Semaphore_InitialValue_AllTaken = 0,
56 oC_Semaphore_InitialValue_GiveBinary = 1
57 } oC_Semaphore_InitialValue_t;
59 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 67 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ 71 extern oC_Semaphore_t oC_Semaphore_New ( oC_Semaphore_Type_t Type , oC_Semaphore_InitialValue_t InitialValue ,
Allocator_t Allocator , AllocationFlags_t Flags );
72 extern bool oC_Semaphore_Delete ( oC_Semaphore_t * Semaphore , AllocationFlags_t Flags );
73 extern bool oC_Semaphore_IsCorrect ( oC_Semaphore_t Semaphore );
74 extern bool oC_Semaphore_Give ( oC_Semaphore_t Semaphore );
75 extern bool oC_Semaphore_GiveCounting ( oC_Semaphore_t Semaphore , uint32_t Count );
76 extern bool oC_Semaphore_Take ( oC_Semaphore_t Semaphore , oC_Time_t Timeout );
77 extern bool oC_Semaphore_TakeCounting ( oC_Semaphore_t Semaphore , uint32_t Count , oC_Time_t Timeout );
79 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ identifier for allocations
The library with time definitions.
static const oC_Allocator_t Allocator