summaryrefslogtreecommitdiffstats
path: root/src/task.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-11-18 01:23:21 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-11-18 01:23:21 +0100
commit16e2b0213b54991d9f493d4c0ee7efca18436427 (patch)
tree9a94d449dbefd95709e0c8993b9963e3ece88239 /src/task.c
parent5082b5a4d2ec52b90e6d7ed178e462a6f0ff6f3e (diff)
downloadfastd-16e2b0213b54991d9f493d4c0ee7efca18436427.tar
fastd-16e2b0213b54991d9f493d4c0ee7efca18436427.zip
Clean up peer task handling
Diffstat (limited to 'src/task.c')
-rw-r--r--src/task.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/task.c b/src/task.c
index e1dc77d..079fc4a 100644
--- a/src/task.c
+++ b/src/task.c
@@ -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;
}