MEDIUM: pools: use a single pool_gc() function for locked and lockless
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Jun 2021 08:21:35 +0000 (10:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Jun 2021 15:46:50 +0000 (17:46 +0200)
commit9b3ed51371693f70bab07e09cdd34e26e3a46d93
tree87d04f44d9d97e1465b6613cae21e5750ef30e4c
parent26ed183556f3df9e9bde6f6d47143aa4a18ae463
MEDIUM: pools: use a single pool_gc() function for locked and lockless

Locked and lockless shared pools don't need to use a different pool_gc()
function because this function isolates itself during the operation, so
we do not need to rely on DWCAS nor any atomic operation in fact. Let's
just get rid of the lockless one in favor of the simple one. This should
even result in a faster execution.

The ifdefs were slightly moved so that we can have pool_gc() defined
as soon as there are global pools, this avoids duplicating the function.
src/pool.c