diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-04-11 15:13:22 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-04-24 17:53:42 +0200 |
commit | efedd0d21e4caf6edae6872f29c470a464e1917a (patch) | |
tree | 74b0784a419225a74f0ec73d148bfcd04c4a7345 /src/libcharon/plugins/load_tester/load_tester_config.c | |
parent | 1dfd11fd9249704ca29675c5ee11059a79aac203 (diff) | |
download | strongswan-efedd0d21e4caf6edae6872f29c470a464e1917a.tar.bz2 strongswan-efedd0d21e4caf6edae6872f29c470a464e1917a.tar.xz |
utils: Add ref_cur() to retrieve the current value of a reference counter
On many architectures it is safe to read the value directly (those
using cache coherency protocols, and with atomic loads for 32-bit
values) but it is not if that's not the case or if we ever decide to
make refcount_t 64-bit (load not atomic on x86).
So make sure the operation is actually atomic and that users do not
have to care about the size of refcount_t.
Diffstat (limited to 'src/libcharon/plugins/load_tester/load_tester_config.c')
0 files changed, 0 insertions, 0 deletions