From: Mathieu Desnoyers Date: Fri, 14 Jun 2013 21:28:07 +0000 (-0400) Subject: compiler.h: implement CAA_ARRAY_SIZE() X-Git-Tag: v0.8.0~71 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e323ceac1f453085192d53689870f378d897426e;p=userspace-rcu.git compiler.h: implement CAA_ARRAY_SIZE() Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/compiler.h b/urcu/compiler.h index 318ca65..c4ade90 100644 --- a/urcu/compiler.h +++ b/urcu/compiler.h @@ -101,4 +101,6 @@ __attribute__((deprecated)) #endif +#define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + #endif /* _URCU_COMPILER_H */