From d945bca329f7a13741e1d3afcf9f0f73f6c70ce9 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
-int ftrigr_update (ftrigr_t *a) +int ftrigr_updateb (ftrigr_t *a)
@@ -239,11 +239,14 @@ which something happened.
- When ftrigr_update returns, + When ftrigr_updateb returns, genalloc_s(uint16_t, &a->list) points to an array of genalloc_len(uint16_t, &a->list) 16-bit unsigned integers. Those integers are ids waiting to be passed to -ftrigr_check. +ftrigr_check or ftrigr_checksa. +The number of ids already acknowledged is stored in +a->head, so the first unacknowledged id is +genalloc_s(uint16_t, &a->list)[a->head].
@@ -252,7 +255,7 @@ int ftrigr_check (ftrigr_t *a, uint16_t id, char *what)Checks whether an event happened to id. Use after a -call to ftrigr_update(). +call to ftrigr_updateb().
+int ftrigr_ack (ftrigr_t *a, size_t n) ++ +
+ Acknowledges reading n ids from the id list updated by +ftrigr_updateb. +
+ ++int ftrigr_update (ftrigr_t *a) ++ +
+ Acknowledges all the pending ids (i.e. clears the stored id list) +then calls ftrigr_updateb(). +
+