summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-26 21:04:38 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-26 21:04:38 +0200
commit57de20dd8fcf156ce8071810f0be8a22786bb1c0 (patch)
treed2aa10e1564535d9222a59cff5a0d35098f5620c /src
parentbd91b83e578165b4c242c9f34ff1d3be8fb3ab22 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/basic/refcnt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/refcnt.h b/src/basic/refcnt.h
index 0502c20a2e..8a39d69fe4 100644
--- a/src/basic/refcnt.h
+++ b/src/basic/refcnt.h
@@ -21,7 +21,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-/* 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;