summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/refcount.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-11-23 19:09:51 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-01 11:28:15 +0100
commit0d3b80f04a1caee51b9995c9626838f85295bb06 (patch)
tree232a7cf64cd052d1f86ff0bfcc0292a17a7050ae /libshouldbeinlibc/refcount.c
parent40d433fd1ca3aedac58a281f982725bfa9f77997 (diff)
libshouldbeinlibc: move the reference counting primitives here
Declare all functions `extern inline' instead of `static inline'. This allows us to use them in functions declared as `extern inline'. * libshouldbeinlibc/refcount.h: Move here, and declare all functions `extern inline'. * libshouldbeinlibc/refcount.c: And define the functions here. * libshouldbeinlibc/Makefile: Add `refcount.{c,h}'.
Diffstat (limited to 'libshouldbeinlibc/refcount.c')
-rw-r--r--libshouldbeinlibc/refcount.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libshouldbeinlibc/refcount.c b/libshouldbeinlibc/refcount.c
new file mode 100644
index 00000000..17e01c53
--- /dev/null
+++ b/libshouldbeinlibc/refcount.c
@@ -0,0 +1,23 @@
+/* Lock-less reference counting primitives
+
+ Copyright (C) 2014 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */
+
+#define REFCOUNT_DEFINE_EI
+#include "refcount.h"