summaryrefslogtreecommitdiff
path: root/uring.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-20 12:53:25 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-20 12:53:25 +0200
commite11014c0443ea687ad65a14b9124aa366da7984a (patch)
tree8c6642ed187dc71cc672cec9f3459aa75134eaa5 /uring.c
parentfc25e880dfb1f804742006bcdd15ac70d18b4144 (diff)
Introduce helper for checking if a task is dead
Diffstat (limited to 'uring.c')
-rw-r--r--uring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/uring.c b/uring.c
index e1fad53..5e1b168 100644
--- a/uring.c
+++ b/uring.c
@@ -386,6 +386,8 @@ uring_tbuf_read_until(struct cfg *cfg, struct uring_task *task,
static int
uring_tbuf_eof(struct cfg *cfg, struct uring_task *task, int res)
{
+ assert_task_alive_or(DBG_UR, task, return -EINTR);
+
if (task->tbuf->len + 1 >= sizeof(task->tbuf->buf))
return -E2BIG;