update spinlock wrapper
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Jun 2011 03:03:30 +0000 (23:03 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Jun 2011 03:03:30 +0000 (23:03 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
wrapper/spinlock.h

index e38d3891216cc8a81272755fe32e951e78f27321..8b1ad992559590a31c0be4ce3e8476bdd510f020 100644 (file)
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
 
-#define raw_spin_lock_init(lock)                               \
-       do {                                                    \
-               *(lock) = __RAW_SPIN_LOCK_UNLOCKED;             \
+#include <linux/string.h>
+
+#define raw_spin_lock_init(lock)                                       \
+       do {                                                            \
+               raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED;       \
+               memcpy(lock, &__lock, sizeof(lock));                    \
        } while (0)
 
 #define raw_spin_is_locked(lock)       __raw_spin_is_locked(lock)
This page took 0.025916 seconds and 4 git commands to generate.