ust: continue work
[ust.git] / share / kernelcompat.h
index 5bd8e87503f22ecf30b3d2d170f77c5e3e15b13b..6bc09caea232bc6f1257ad196380fd445ce5cad1 100644 (file)
@@ -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 <unistd.h>
+
+#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]))
This page took 0.023353 seconds and 4 git commands to generate.