diff options
-rw-r--r-- | uring.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -142,8 +142,16 @@ uring_parent(struct cfg *cfg) } void -uring_task_init(struct uring_task *task, const char *name, struct uring_task *parent, void (*free)(struct uring_task *)) +uring_task_init(struct uring_task *task, const char *name, + struct uring_task *parent, void (*free)(struct uring_task *)) { + static bool first = true; + + if (first) + first = false; + else if (!parent) + die("uring_task_init called without a parent\n"); + if (!free) die("uring_task_init called without destructor\n"); |