Correctly functioning 64-bit atomic shim layer. It's not

what I would call effecient but it does have the advantage
of being correct which is all I need right now.  I added
a regression test as well.



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@57 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-03-28 18:21:09 +00:00
parent 4a4295b267
commit 9f4c835a0e
7 changed files with 275 additions and 14 deletions
+1
View File
@@ -19,6 +19,7 @@ spl-objs += spl-time.o
spl-objs += spl-kobj.o
spl-objs += spl-module.o
spl-objs += spl-generic.o
spl-objs += spl-atomic.o
splmodule := spl.ko
splmoduledir := @kmoduledir@/kernel/lib/
+10
View File
@@ -0,0 +1,10 @@
#include <sys/atomic.h>
/* Global atomic lock declarations */
spinlock_t atomic64_lock = SPIN_LOCK_UNLOCKED;
spinlock_t atomic32_lock = SPIN_LOCK_UNLOCKED;
spinlock_t atomic_lock = SPIN_LOCK_UNLOCKED;
EXPORT_SYMBOL(atomic64_lock);
EXPORT_SYMBOL(atomic32_lock);
EXPORT_SYMBOL(atomic_lock);