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 16:37:48 +0000 (18:37 +0200)
commitad6e04a1b575a731b01913ff092352d958481775
treea6dbfa2a6b2877624f8d8a9685ff2d57a4f9831b
parentfb1086c101bddb9ab49bb09d9077802da37e80d8
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>
include/haproxy/task-t.h
include/haproxy/task.h