16 #ifndef included_clib_lock_h 17 #define included_clib_lock_h 52 while (__sync_lock_test_and_set (&(*p)->lock, 1))
54 __builtin_ia32_pause ()
58 (*p)->frame_address = __builtin_frame_address (0);
59 (*p)->pid = getpid ();
75 (*p)->frame_address = 0;
77 (*p)->thread_index = 0;
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
static_always_inline void clib_spinlock_unlock_if_init(clib_spinlock_t *p)
static void clib_spinlock_free(clib_spinlock_t *p)
#define static_always_inline
static void clib_spinlock_init(clib_spinlock_t *p)
static void clib_mem_free(void *p)
static_always_inline uword os_get_thread_index(void)
static void * clib_mem_alloc_aligned(uword size, uword align)
#define CLIB_MEMORY_BARRIER()
#define CLIB_CACHE_LINE_BYTES
static_always_inline void clib_spinlock_lock_if_init(clib_spinlock_t *p)