From: Mathieu Desnoyers Date: Wed, 13 May 2009 15:09:49 +0000 (-0400) Subject: Removing GPL likely, unlikely, ACCESS_ONCE and barrier X-Git-Tag: v0.1~232 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=d8429b11e257939635c5dc4786756effdc38b494 Removing GPL likely, unlikely, ACCESS_ONCE and barrier Signed-off-by: Mathieu Desnoyers --- diff --git a/compiler.h b/compiler.h index 2507ec8..fb09ca2 100644 --- a/compiler.h +++ b/compiler.h @@ -25,12 +25,6 @@ * IBM's contributions to this file may be relicensed under LGPLv2 or later. */ -/* The "volatile" is due to gcc bugs */ -#define barrier() __asm__ __volatile__("": : :"memory") - -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) - /* * Instruct the compiler to perform only a single access to a variable * (prohibits merging and refetching). The compiler is also forbidden to reorder @@ -43,6 +37,5 @@ * use is to mediate communication between process-level code and irq/NMI * handlers, all running on the same CPU. */ -#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) #endif /* _COMPILER_H */