Rename urcu/urcu_ref.h to urcu/ref.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Jun 2011 20:02:31 +0000 (16:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Jun 2011 20:02:31 +0000 (16:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile.am
urcu/rculfqueue.h
urcu/ref.h [new file with mode: 0644]
urcu/static/rculfqueue.h
urcu/urcu_ref.h [deleted file]

index 53268e5cc487525dabe46646c5020a1cd70feeb2..44906fc2482805405c6250fcc5a093e0f229cb1c 100644 (file)
@@ -10,7 +10,7 @@ nobase_dist_include_HEADERS = urcu/compiler.h urcu/hlist.h urcu/list.h \
                urcu/rculist.h urcu/rcuhlist.h urcu/system.h urcu/urcu-futex.h \
                urcu/uatomic/generic.h urcu/arch/generic.h urcu/wfstack.h \
                urcu/wfqueue.h urcu/rculfstack.h urcu/rculfqueue.h \
-               urcu/urcu_ref.h urcu/map/*.h urcu/static/*.h
+               urcu/ref.h urcu/map/*.h urcu/static/*.h
 nobase_nodist_include_HEADERS = urcu/arch.h urcu/uatomic.h urcu/config.h
 
 EXTRA_DIST = $(top_srcdir)/urcu/arch/*.h $(top_srcdir)/urcu/uatomic/*.h \
index c3084b7bfe8e3f1d44dd4e9d5dd9c5ee2cd8ab1d..fbef6f9763e4b3525f9a844b462a337ce1dcce8e 100644 (file)
@@ -23,7 +23,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <urcu/urcu_ref.h>
+#include <urcu/ref.h>
 #include <assert.h>
 
 #ifdef __cplusplus
diff --git a/urcu/ref.h b/urcu/ref.h
new file mode 100644 (file)
index 0000000..a422a99
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef _URCU_REF_H
+#define _URCU_REF_H
+
+/*
+ * Userspace RCU - Reference counting
+ *
+ * Copyright (C) 2009 Novell Inc.
+ * Copyright (C) 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Author: Jan Blunck <jblunck@suse.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free  Software Foundation.
+ */
+
+#include <assert.h>
+#include <urcu/uatomic.h>
+
+struct urcu_ref {
+       long refcount; /* ATOMIC */
+};
+
+static inline void urcu_ref_set(struct urcu_ref *ref, long val)
+{
+       uatomic_set(&ref->refcount, val);
+}
+
+static inline void urcu_ref_init(struct urcu_ref *ref)
+{
+       urcu_ref_set(ref, 1);
+}
+
+static inline void urcu_ref_get(struct urcu_ref *ref)
+{
+       uatomic_add(&ref->refcount, 1);
+}
+
+static inline void urcu_ref_put(struct urcu_ref *ref,
+                               void (*release)(struct urcu_ref *))
+{
+       long res = uatomic_sub_return(&ref->refcount, 1);
+       assert (res >= 0);
+       if (res == 0)
+               release(ref);
+}
+
+#endif /* _URCU_REF_H */
index 75df98582e00f5cc94ded1b29af2a0bc8867cf09..b627e450cfdd581692b474d89437e3fd47f18463 100644 (file)
@@ -26,7 +26,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <urcu/urcu_ref.h>
+#include <urcu/ref.h>
 #include <urcu/uatomic.h>
 #include <assert.h>
 /* A urcu implementation header should be already included. */
diff --git a/urcu/urcu_ref.h b/urcu/urcu_ref.h
deleted file mode 100644 (file)
index a422a99..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _URCU_REF_H
-#define _URCU_REF_H
-
-/*
- * Userspace RCU - Reference counting
- *
- * Copyright (C) 2009 Novell Inc.
- * Copyright (C) 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Author: Jan Blunck <jblunck@suse.de>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free  Software Foundation.
- */
-
-#include <assert.h>
-#include <urcu/uatomic.h>
-
-struct urcu_ref {
-       long refcount; /* ATOMIC */
-};
-
-static inline void urcu_ref_set(struct urcu_ref *ref, long val)
-{
-       uatomic_set(&ref->refcount, val);
-}
-
-static inline void urcu_ref_init(struct urcu_ref *ref)
-{
-       urcu_ref_set(ref, 1);
-}
-
-static inline void urcu_ref_get(struct urcu_ref *ref)
-{
-       uatomic_add(&ref->refcount, 1);
-}
-
-static inline void urcu_ref_put(struct urcu_ref *ref,
-                               void (*release)(struct urcu_ref *))
-{
-       long res = uatomic_sub_return(&ref->refcount, 1);
-       assert (res >= 0);
-       if (res == 0)
-               release(ref);
-}
-
-#endif /* _URCU_REF_H */
This page took 0.027105 seconds and 4 git commands to generate.