From 1544f90960275dc9211bde30329c3258e0e1bf38 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 25 Dec 2004 21:56:33 +0000 Subject: New thread library --- src/libthread/ref.c | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/libthread/ref.c (limited to 'src/libthread/ref.c') diff --git a/src/libthread/ref.c b/src/libthread/ref.c deleted file mode 100644 index a3b2cbae..00000000 --- a/src/libthread/ref.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Atomic reference counts - used by applications. - * - * We use locks to avoid the assembly of the Plan 9 versions. - */ - -#include "threadimpl.h" - -void -incref(Ref *r) -{ - lock(&r->lk); - r->ref++; - unlock(&r->lk); -} - -long -decref(Ref *r) -{ - long n; - - lock(&r->lk); - n = --r->ref; - unlock(&r->lk); - return n; -} -- cgit v1.2.3