Module: xenomai-forge Branch: master Commit: 6bceb6b3365885ad36d6bef9128ec93e2f3c637e URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6bceb6b3365885ad36d6bef9128ec93e2f3c637e
Author: Philippe Gerum <[email protected]> Date: Sat Nov 12 19:24:50 2011 +0100 copperplate/lock: introduce compare-and-exchange atomic op --- include/copperplate/lock.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/copperplate/lock.h b/include/copperplate/lock.h index dc4147d..72c76c3 100644 --- a/include/copperplate/lock.h +++ b/include/copperplate/lock.h @@ -190,5 +190,7 @@ int __check_cancel_type(const char *locktype); #define atomic_sub_fetch(v, n) __sync_sub_and_fetch(&(v), n) #define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n) +#define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n) +#define atomic_cmp_swap(ptr, old, new) __sync_val_compare_and_swap(ptr, old, new) #endif /* _COPPERPLATE_LOCK_H */ _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
