Monado OpenXR Runtime
xrt_compiler.h File Reference

Header holding common defines. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for xrt_compiler.h:

Go to the source code of this file.

Macros

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
 Array size helper. More...
 
#define XRT_32_BIT
 
#define XRT_PRINTF_FORMAT(fmt, list)
 
#define XRT_MAYBE_UNUSED
 
#define XRT_CHECK_RESULT
 
#define XRT_NO_INLINE
 
#define XRT_DEBUGBREAK()
 To trigger a trap/break in the debugger. More...
 
#define container_of(ptr, type, field)   (type *)((char *)ptr - offsetof(type, field))
 Get the holder from a pointer to a field. More...
 
#define XRT_STRUCT_INIT   {}
 Very small default init for structs that works in both C and C++. More...
 

Typedefs

typedef volatile int32_t xrt_atomic_s32_t
 

Functions

static int32_t xrt_atomic_s32_inc_return (xrt_atomic_s32_t *p)
 
static int32_t xrt_atomic_s32_dec_return (xrt_atomic_s32_t *p)
 
static int32_t xrt_atomic_s32_cmpxchg (xrt_atomic_s32_t *p, int32_t old_, int32_t new_)
 

Detailed Description

Header holding common defines.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Array size helper.