X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=share%2Fkernelcompat.h;h=6bc09caea232bc6f1257ad196380fd445ce5cad1;hb=5f54827b88b093974e4bf58f67490036718644c7;hp=5bd8e87503f22ecf30b3d2d170f77c5e3e15b13b;hpb=e1152c3706f5140e7267f75dc597daa1a9c579a6;p=ust.git diff --git a/share/kernelcompat.h b/share/kernelcompat.h index 5bd8e87..6bc09ca 100644 --- a/share/kernelcompat.h +++ b/share/kernelcompat.h @@ -124,9 +124,15 @@ static int atomic_read(atomic_t *p) return p->counter; } -/* CACHE */ +/* LOCAL OPS */ + + + +/* ATTRIBUTES */ #define ____cacheline_aligned +#define __init +#define __exit /* MATH */ @@ -166,6 +172,18 @@ static __inline__ int get_count_order(unsigned int count) } + + +#include + +#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) +#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) +#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) + + + + /* ARRAYS */ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))