Choco OS  V.0.16.9.0
Join to the chocolate world
oc_mutex.h
Go to the documentation of this file.
1 
28 #ifndef INC_KERNEL_OC_MUTEX_H_
29 #define INC_KERNEL_OC_MUTEX_H_
30 
31 #include <stdbool.h>
32 #include <oc_time.h>
33 #include <oc_stdlib.h>
34 
40 #define _________________________________________TYPES_SECTION______________________________________________________________________________
41 
44 typedef struct Mutex_t * oC_Mutex_t;
45 
46 typedef enum
47 {
48  oC_Mutex_Type_Normal ,
49  oC_Mutex_Type_Recursive
50 } oC_Mutex_Type_t;
51 
52 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
53 
60 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
61 
64 extern oC_Mutex_t oC_Mutex_New ( oC_Mutex_Type_t Type , Allocator_t Allocator , AllocationFlags_t AllocationFlags );
65 extern bool oC_Mutex_Delete ( oC_Mutex_t * Mutex , AllocationFlags_t AllocationFlags );
66 extern bool oC_Mutex_Give ( oC_Mutex_t Mutex );
67 extern bool oC_Mutex_Take ( oC_Mutex_t Mutex , oC_Time_t Timeout );
68 extern bool oC_Mutex_IsCorrect ( oC_Mutex_t Mutex );
69 
70 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
71 
73 #endif /* INC_KERNEL_OC_MUTEX_H_ */
identifier for allocations
Definition: oc_stdlib.h:159
The library with time definitions.
static const oC_Allocator_t Allocator
Definition: oc_eth.c:152