From: Lennart Poettering Date: Wed, 26 Aug 2015 19:04:38 +0000 (+0200) Subject: basic: document that people shouldn't use refcnt.h without reason X-Git-Tag: v226.4~1^2~111 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=372e2cc96c65d0a92eb969be911ace6d2dc8fc46 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. --- 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;