From 0d3b80f04a1caee51b9995c9626838f85295bb06 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 23 Nov 2014 19:09:51 +0100 Subject: 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}'. --- libshouldbeinlibc/refcount.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libshouldbeinlibc/refcount.c (limited to 'libshouldbeinlibc/refcount.c') 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 . */ + +#define REFCOUNT_DEFINE_EI +#include "refcount.h" -- cgit v1.2.3