18 #ifndef _COBALT_UAPI_KERNEL_TYPES_H
19 #define _COBALT_UAPI_KERNEL_TYPES_H
21 #include <linux/types.h>
22 #include <cobalt/uapi/kernel/limits.h>
24 typedef __u64 xnticks_t;
26 typedef __s64 xnsticks_t;
28 typedef __u32 xnhandle_t;
30 #define XN_NO_HANDLE ((xnhandle_t)0)
31 #define XN_HANDLE_INDEX_MASK ((xnhandle_t)0xf0000000)
34 #define XNSYNCH_PSHARED ((xnhandle_t)0x40000000)
37 #define XNSYNCH_FLCLAIM ((xnhandle_t)0x80000000)
39 #define XN_HANDLE_TRANSIENT_MASK XNSYNCH_FLCLAIM
45 static inline xnhandle_t xnhandle_get_index(xnhandle_t handle)
47 return handle & ~XN_HANDLE_INDEX_MASK;
54 static inline xnhandle_t xnhandle_get_id(xnhandle_t handle)
56 return handle & ~XN_HANDLE_TRANSIENT_MASK;