diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-18 01:23:21 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-18 01:23:21 +0100 |
commit | 16e2b0213b54991d9f493d4c0ee7efca18436427 (patch) | |
tree | 9a94d449dbefd95709e0c8993b9963e3ece88239 /src/task.c | |
parent | 5082b5a4d2ec52b90e6d7ed178e462a6f0ff6f3e (diff) | |
download | fastd-16e2b0213b54991d9f493d4c0ee7efca18436427.tar fastd-16e2b0213b54991d9f493d4c0ee7efca18436427.zip |
Clean up peer task handling
Diffstat (limited to 'src/task.c')
-rw-r--r-- | src/task.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -76,11 +76,10 @@ void fastd_task_reschedule(fastd_task_t *task, fastd_timeout_t timeout) { fastd_pqueue_insert(&ctx.task_queue, &task->entry); } -/** Gets the timeout of the next task (if any) */ -bool fastd_task_timeout(fastd_timeout_t *timeout) { +/** Gets the timeout of the next task in the task queue */ +fastd_timeout_t fastd_task_queue_timeout(void) { if (!ctx.task_queue) - return false; + return fastd_timeout_inv; - *timeout = ctx.task_queue->value; - return true; + return ctx.task_queue->value; } |