ust: continue work
[ust.git] / share / kernelcompat.h
index 6d7ebb023f0408252230b4a4d6a75a2324ccb0b3..e322bdbaad8c504e7e679e09afaf6a0432adb914 100644 (file)
@@ -63,6 +63,7 @@ typedef uint64_t u64;
 #include <pthread.h>
 
 #define DEFINE_MUTEX(m) pthread_mutex_t (m) = PTHREAD_MUTEX_INITIALIZER;
+#define DECLARE_MUTEX(m) extern pthread_mutex_t (m);
 
 #define mutex_lock(m) pthread_mutex_lock(m)
 
@@ -82,10 +83,12 @@ typedef int spinlock_t;
 #include <stdlib.h>
 
 #define kmalloc(s, t) malloc(s)
-#define kzalloc(s, t) malloc(s)
+#define kzalloc(s, t) zmalloc(s)
 #define kfree(p) free((void *)p)
 #define kstrdup(s, t) strdup(s)
 
+#define zmalloc(s) calloc(1, s)
+
 #define GFP_KERNEL
 
 /* PRINTK */
@@ -108,6 +111,8 @@ typedef int spinlock_t;
 #define rcu_assign_pointer(a, b) do {} while(0)
 #define call_rcu_sched(a,b) do {} while(0)
 #define rcu_barrier_sched() do {} while(0)
+#define rcu_read_lock_sched_notrace() do{} while (0)
+#define rcu_read_unlock_sched_notrace() do{} while (0)
 
 /* ATOMICITY */
 
@@ -293,4 +298,15 @@ static inline u32 trace_clock_freq_scale(void)
        return 0;
 }
 
+
+/* LISTS */
+
+#define list_add_rcu list_add
+#define list_for_each_entry_rcu list_for_each_entry
+
+
+#define EXPORT_SYMBOL_GPL(a) /*nothing*/
+
+#define smp_processor_id() (-1)
+
 #endif /* KERNELCOMPAT_H */
This page took 0.022974 seconds and 4 git commands to generate.