bind9/lib/isc/include/isc
Mark Andrews 1af9cf78bd Use memory_order_acq_rel in isc_refcount_decrement.
While

if (isc_refcount_decrement() == 1) {	// memory_order_release
	isc_refcount_destroy();		// memory_order_acquire
	...
}

is theoretically the most efficent in practice, using
memory_order_acq_rel produces the same code on x86_64 and doesn't
trigger tsan data races (which use a idealistic model) if
isc_refcount_destroy() is not called immediately.  In fact
isc_refcount_destroy() could be removed if we didn't want
to check for the count being 0 when isc_refcount_destroy() is
called.

https://stackoverflow.com/questions/49112732/memory-order-in-shared-pointer-destructor
(cherry picked from commit 6278899a38)
2020-09-01 22:24:52 +10:00
..
aes.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
app.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
assertions.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
astack.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
atomic.h Use memory_order_acq_rel in isc_refcount_decrement. 2020-09-01 22:24:52 +10:00
backtrace.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
base32.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
base64.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
bind9.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
buffer.h Fix/improve some comments in buffer.h. 2020-04-16 15:58:25 +02:00
bufferlist.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
commandline.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
counter.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
crc64.h Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
deprecated.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
endian.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
errno.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
error.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
event.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
eventclass.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
file.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
formatcheck.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
fsaccess.h fix spelling errors reported by Fossies. 2020-02-21 07:05:31 +00:00
fuzz.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
hash.h Add isc_hash32() and rename isc_hash_function() to isc_hash64() 2020-07-30 11:57:24 +02:00
heap.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
hex.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
hmac.h Stop leaking OpenSSL types and defines in the isc/hmac.h 2020-04-28 16:28:54 +02:00
hp.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
ht.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
httpd.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
interfaceiter.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
iterated_hash.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
lang.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
lex.h fix spelling errors reported by Fossies. 2020-02-21 07:05:31 +00:00
lfsr.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
lib.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
likely.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
list.h Fixup the missing clang-format bits 2020-02-16 18:07:27 +01:00
log.h Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 11:44:18 +01:00
magic.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
Makefile.in Report Extended DNS Error codes 2020-05-13 10:26:39 +10:00
md.h Stop leaking OpenSSL types and defines in the isc/md.h 2020-04-28 15:24:07 +02:00
mem.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
meminfo.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
mutexatomic.h Make the stdatomic shim and mutexatomic type complete 2020-07-08 10:29:59 +10:00
mutexblock.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
netaddr.h fix spelling errors reported by Fossies. 2020-02-21 07:05:31 +00:00
netmgr.h restore "blackhole" functionality 2020-06-30 21:10:31 -07:00
netscope.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
nonce.h Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
os.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
parseint.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
platform.h.in Add and use ISC_THREAD_LOCAL macro 2019-12-03 16:27:24 +01:00
pool.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
portset.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
print.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
queue.h implement fetch-and-add array queue data structure 2019-11-07 11:55:37 -08:00
quota.h Redesigned TCP accepting: one listen/accept loop, passing the connected socket. 2020-06-03 23:00:52 +02:00
radix.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
random.h Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
ratelimiter.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
refcount.h Use memory_order_acq_rel in isc_refcount_decrement. 2020-09-01 22:24:52 +10:00
regex.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
region.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
resource.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
result.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
resultclass.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
rwlock.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
safe.h Stop leaking OpenSSL types and defines in the isc/safe.h 2020-04-28 16:27:39 +02:00
serial.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
siphash.h Add HalfSipHash 2-4 reference implementation 2020-07-30 11:57:24 +02:00
sockaddr.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
socket.h fix spelling errors reported by Fossies. 2020-02-21 07:05:31 +00:00
stats.h fix spelling errors reported by Fossies. 2020-02-21 07:05:31 +00:00
stdio.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
strerr.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
string.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
symtab.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
task.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
taskpool.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
timer.h Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
tm.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00
types.h Merge branch '46-add-curly-braces' into 'master' 2020-02-13 21:28:35 +00:00
utf8.h Report Extended DNS Error codes 2020-05-13 10:26:39 +10:00
util.h Add +yaml support for EDE 2020-06-05 10:50:58 +10:00
version.h Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master' 2020-02-12 14:51:18 +00:00