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)
38 #define XNSYNCH_FLCEIL ((xnhandle_t)0x20000000)
40 #define XN_HANDLE_TRANSIENT_MASK (XNSYNCH_FLCLAIM|XNSYNCH_FLCEIL)
46 static inline xnhandle_t xnhandle_get_index(xnhandle_t handle)
48 return handle & ~XN_HANDLE_INDEX_MASK;
55 static inline xnhandle_t xnhandle_get_id(xnhandle_t handle)
57 return handle & ~XN_HANDLE_TRANSIENT_MASK;