]> git.ipfire.org Git - thirdparty/openssl.git/commit
Do some more cleanup in the RCU code
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 9 Mar 2025 10:20:43 +0000 (11:20 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 18 Mar 2025 17:53:00 +0000 (18:53 +0100)
commit839ea19a5e2958405e6961835fa9b9463b0aa459
tree18d2ea51725368b004979fe4556f7f63074545be
parentbc7bfdeceda27a1abfc32162ec1d25287f0cbe58
Do some more cleanup in the RCU code

Only a minimum of 2 qp's are necessary: one for the readers,
and at least one that writers can wait on for retirement.
There is no need for one additional qp that is always unused.
Also only one ACQUIRE barrier is necessary in get_hold_current_qp,
so the ATOMIC_LOAD of the reader_idx can be changed to RELAXED.
And finally clarify some comments.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27012)

(cherry picked from commit a532f2302d9eac7a2ba52b9929b790c20347c9ba)
crypto/threads_pthread.c
crypto/threads_win.c