summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-09 14:59:45 -0500
committerDave Brolley <brolley@redhat.com>2009-11-09 14:59:45 -0500
commit52cd76fae6eee285a4d8345ee595f0b8a2907d7b (patch)
treec25ea6497334a08c1762b25b72565dd4b8a8baf8 /runtime
parent64211010978d0e35c80ec7c119f1986a48f97543 (diff)
parentdd905cf4dd14d5d53d0bc3696acaba04bda57bb5 (diff)
downloadsystemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.tar.gz
systemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.tar.xz
systemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime')
-rw-r--r--runtime/runtime.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index a95627ae..ba583aeb 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -179,6 +179,17 @@ void cleanup_module(void)
_stp_transport_close();
}
+#define pseudo_atomic_cmpxchg(v, old, new) ({\
+ int ret;\
+ unsigned long flags;\
+ local_irq_save(flags);\
+ ret = atomic_read(v);\
+ if (likely(ret == old))\
+ atomic_set(v, new);\
+ local_irq_restore(flags);\
+ ret; })
+
+
MODULE_LICENSE("GPL");
#endif /* _RUNTIME_H_ */