From 372e2cc96c65d0a92eb969be911ace6d2dc8fc46 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 26 Aug 2015 21:04:38 +0200 Subject: [PATCH] basic: document that people shouldn't use refcnt.h without reason refcnt.h only exists for cases where objects are simultaneously handled by different threads. Otherwise it should not be used. The only case where this applies is sd_bus, really, and pretty much none of our APIs, since we do not claim thread-safety for them. --- src/basic/refcnt.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/basic/refcnt.h b/src/basic/refcnt.h index 0502c20a2..8a39d69fe 100644 --- a/src/basic/refcnt.h +++ b/src/basic/refcnt.h @@ -21,7 +21,9 @@ along with systemd; If not, see . ***/ -/* A type-safe atomic refcounter */ +/* A type-safe atomic refcounter. + * + * DO NOT USE THIS UNLESS YOU ACTUALLY CARE ABOUT THREAD SAFETY! */ typedef struct { volatile unsigned _value; -- 2.30.2