From 86cad62c5cff12689cc99f413d95c6587eefba07 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 11 Feb 2019 16:41:51 +0100 Subject: [PATCH] added new states for shutdown --- common/include/villas/common.h | 6 +++++- common/lib/task.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/include/villas/common.h b/common/include/villas/common.h index 18fbe8f8e..7f1df3c94 100644 --- a/common/include/villas/common.h +++ b/common/include/villas/common.h @@ -41,7 +41,11 @@ enum state { STATE_CLOSED = 5, /* alias for STATE_STARTED used by struct io */ STATE_PENDING_CONNECT = 6, STATE_CONNECTED = 7, - STATE_PAUSED = 8 + STATE_PAUSED = 8, + STATE_STARTING = 9, + STATE_STOPPING = 10, + STATE_PAUSING = 11, + STATE_RESUMING = 12 }; /** Callback to destroy list elements. diff --git a/common/lib/task.c b/common/lib/task.c index 06774c5dc..d3628f29a 100644 --- a/common/lib/task.c +++ b/common/lib/task.c @@ -127,9 +127,9 @@ int task_destroy(struct task *t) { #if PERIODIC_TASK_IMPL == TIMERFD return close(t->fd); -#endif - +#else return 0; +#endif } uint64_t task_wait(struct task *t)