*
* library wrappers to be used by non-LGPL compatible source code.
*
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
*
* This library is free software; you can redistribute it and/or
* IBM's contributions to this file may be relicensed under LGPLv2 or later.
*/
-#include "urcu-pointer-static.h"
+#include <urcu/uatomic.h>
+
+#include "urcu/static/urcu-pointer.h"
/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
#include "urcu-pointer.h"
extern void synchronize_rcu(void);
-void *rcu_dereference(void *p)
+void *rcu_dereference_sym(void *p)
{
return _rcu_dereference(p);
}
void *rcu_set_pointer_sym(void **p, void *v)
{
- wmb();
- return STORE_SHARED(*p, v);
+ cmm_wmb();
+ return uatomic_set(p, v);
}
void *rcu_xchg_pointer_sym(void **p, void *v)
{
- wmb();
+ cmm_wmb();
return uatomic_xchg(p, v);
}
void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
{
- wmb();
+ cmm_wmb();
return uatomic_cmpxchg(p, old, _new);
}
-
-void *rcu_publish_content_sym(void **p, void *v)
-{
- void *oldptr;
-
- oldptr = _rcu_xchg_pointer(p, v);
- synchronize_rcu();
- return oldptr;
-}