]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: notifications: add precisions about thread usage
authorThierry FOURNIER <thierry.fournier@ozon.io>
Sun, 10 Dec 2017 16:14:07 +0000 (17:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 Dec 2017 18:38:55 +0000 (19:38 +0100)
Precise the terms of use the notification functions.

include/proto/task.h

index 429148244eeb9f28ce3f31428c38a9a1b3ec9cd5..1422bf2428abc99eac9606c318bd43c2433eac11 100644 (file)
@@ -304,6 +304,9 @@ static inline struct notification *notification_new(struct list *purge, struct l
 /* This function purge all the pending signals when the LUA execution
  * is finished. This prevent than a coprocess try to wake a deleted
  * task. This function remove the memory associated to the signal.
+ * The purge list is not locked because it is owned by only one
+ * process. before browsing this list, the caller must ensure to be
+ * the only one browser.
  */
 static inline void notification_purge(struct list *purge)
 {
@@ -325,7 +328,9 @@ static inline void notification_purge(struct list *purge)
 
 /* This function sends signals. It wakes all the tasks attached
  * to a list head, and remove the signal, and free the used
- * memory.
+ * memory. The wake list is not locked because it is owned by
+ * only one process. before browsing this list, the caller must
+ * ensure to be the only one browser.
  */
 static inline void notification_wake(struct list *wake)
 {