mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-08 06:31:56 +00:00
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.
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user