MINOR: task: add thread safe notification_new and notification_wake variants
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 1 Apr 2025 08:07:50 +0000 (10:07 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 15 Apr 2025 20:26:59 +0000 (22:26 +0200)
commitf2eec2789d30fd96d0b86d89dbb24c5bf2ea48ff
tree6202dfcc3133d1f6a765e975891f83f857424312
parent22720d042613f54b68ec212338e2d15d8d471976
MINOR: task: add thread safe notification_new and notification_wake variants

notification_new and notification_wake were historically meant to be
called by a single thread doing both the init and the wakeup for other
tasks waiting on the signals.

In this patch, we extend the API so that notification_new and
notification_wake have thread-safe variants that can safely be used with
multiple threads registering on the same list of events and multiple
threads pushing updates on the list.

(cherry picked from commit b77b1a2c3ac70a719a2a06964e56a206ab9cc6ec)
Signed-off-by: Aurelien DARRAGON <adarragon@haproxy.com>
(cherry picked from commit ad6e04a1b575a731b01913ff092352d958481775)
Signed-off-by: Aurelien DARRAGON <adarragon@haproxy.com>
include/haproxy/task-t.h
include/haproxy/task.h