armv5 archs require write alignment
[ust.git] / include / ust / core.h
index 8cedf98903e7817fd2f3555fc9d6f976eace389c..d0e2750f1fab74253c9f2bcd2c843ccf7943241c 100644 (file)
 #define UST_CORE_H
 
 #include <sys/types.h>
+#include <ust/config.h>
 
 #define likely(x)      __builtin_expect(!!(x), 1)
 #define unlikely(x)    __builtin_expect(!!(x), 0)
 
-#if defined(CONFIG_LTT) && defined(CONFIG_LTT_ALIGNMENT)
+#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 /*
  * Calculate the offset needed to align the type.
@@ -42,7 +43,7 @@ static inline int ltt_get_alignment(void)
        return sizeof(void *);
 }
 
-#else
+#else /* HAVE_EFFICIENT_UNALIGNED_ACCESS */
 
 static inline unsigned int ltt_align(size_t align_drift,
                 size_t size_of_type)
@@ -56,7 +57,7 @@ static inline int ltt_get_alignment(void)
 {
        return 0;
 }
-#endif /* defined(CONFIG_LTT) && defined(CONFIG_LTT_ALIGNMENT) */
+#endif /* HAVE_EFFICIENT_UNALIGNED_ACCESS */
 
 
 /* ARRAYS */
@@ -119,11 +120,6 @@ static inline long IS_ERR(const void *ptr)
 
 #define zmalloc(s) calloc(1, s)
 
-/* ATTRIBUTES */
-
-/* FIXME: define this */
-#define ____cacheline_aligned
-
 /* MATH */
 
 #include <ust/processor.h>
@@ -146,7 +142,7 @@ static __inline__ int get_count_order(unsigned int count)
        return order;
 }
 
-#define container_of(ptr, type, member) ({                      \
+#define _ust_container_of(ptr, type, member) ({                      \
         const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
         (type *)( (char *)__mptr - offsetof(type,member) );})
 
This page took 0.022672 seconds and 4 git commands to generate.