[riot-notifications] [RIOT-OS/RIOT] sys/event: add event_wait_until() (#11487)

Kaspar Schleiser notifications at github.com
Mon May 6 14:14:48 CEST 2019


kaspar030 approved this pull request.

Straightforward implementation. Test is a little crude but tests basic operation. ACK, feel free to directly squash the renames. (don't forget to also rename the application).

> @@ -110,6 +114,30 @@ event_t *event_wait(event_queue_t *queue)
     return result;
 }
 
+#ifdef MODULE_XTIMER
+event_t *event_wait_until(event_queue_t *queue, uint32_t timeout)

As discussed offline: please rename to "event_wait_timeout()", to be more inline with msg_receive_timeout, xtimer_mutex_lock_timeout(), and also to not make anyone think "until" is an absolute time.

> @@ -110,6 +114,30 @@ event_t *event_wait(event_queue_t *queue)
     return result;
 }
 
+#ifdef MODULE_XTIMER
+event_t *event_wait_until(event_queue_t *queue, uint32_t timeout)
+{
+    assert(queue);
+    event_t *result;
+    xtimer_t tot;

As discussed offline: please rename to "timer"

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11487#pullrequestreview-233943252
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190506/25c8dda5/attachment.html>


More information about the notifications mailing list