aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libthread/ref.c')
-rw-r--r--src/libthread/ref.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libthread/ref.c b/src/libthread/ref.c
new file mode 100644
index 00000000..9b78e63e
--- /dev/null
+++ b/src/libthread/ref.c
@@ -0,0 +1,13 @@
+#include "threadimpl.h"
+
+void
+incref(Ref *r)
+{
+ _xinc(&r->ref);
+}
+
+long
+decref(Ref *r)
+{
+ return _xdec(&r->ref);
+}