]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add isc_spinlock unit with shim pthread_spin implementation
authorOndřej Surý <ondrej@isc.org>
Fri, 3 Mar 2023 08:24:13 +0000 (09:24 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 21 Apr 2023 10:10:02 +0000 (12:10 +0200)
commitb497e9017915fa925fef96e55ec124435f761c44
tree28828b3c9f30c30b7fe63b45a604ece31e36bdd2
parent32a8773ab35ec7fb4c1c888c9ced59d0522ab10b
Add isc_spinlock unit with shim pthread_spin implementation

The spinlock is small (atomic_uint_fast32_t at most), lightweight
synchronization primitive and should only be used for short-lived and
most of the time a isc_mutex should be used.

Add a isc_spinlock unit which is either (most of the time) a think
wrapper around pthread_spin API or an efficient shim implementation of
the simple spinlock.
configure.ac
lib/isc/Makefile.am
lib/isc/include/isc/spinlock.h [new file with mode: 0644]
lib/isc/include/isc/util.h
tests/isc/Makefile.am
tests/isc/spinlock_test.c [new file with mode: 0644]