changeset 3923:aac27dee1da1

mutek/kroutine: Add kroutine_init_none()
author Nicolas Pouillon <nipo@ssji.net>
date Sun, 22 Apr 2018 19:28:17 +0200
parents d41a9165549b
children da601f4a2675
files mutek/include/mutek/kroutine.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mutek/include/mutek/kroutine.h	Sun Apr 22 19:29:21 2018 +0200
+++ b/mutek/include/mutek/kroutine.h	Sun Apr 22 19:28:17 2018 +0200
@@ -297,6 +297,13 @@
 #endif
 }
 
+/** @This initializes a kroutine with the @ref KROUTINE_NONE policy. */
+ALWAYS_INLINE void kroutine_init_none(struct kroutine_s *kr)
+{
+  kr->policy = KROUTINE_NONE;
+  kr->exec = NULL;
+}
+
 /** @This initializes a kroutine with the @ref KROUTINE_IMMEDIATE policy. */
 ALWAYS_INLINE void kroutine_init_immediate(struct kroutine_s *kr,
                                            kroutine_exec_t *exec)