[MEDIUM] indicate a reason for a task wakeup
It's very frequent to require some information about the
reason why a task is running. Some flags have been added
so that a task now knows if it got woken up due to I/O
completion, timeout, etc...
diff --git a/src/stream_sock.c b/src/stream_sock.c
index 459da71..52860ea 100644
--- a/src/stream_sock.c
+++ b/src/stream_sock.c
@@ -239,7 +239,7 @@
if (!(b->flags & BF_READ_ACTIVITY))
goto out_skip_wakeup;
out_wakeup:
- task_wakeup(fdtab[fd].owner);
+ task_wakeup(fdtab[fd].owner, TASK_WOKEN_IO);
out_skip_wakeup:
fdtab[fd].ev &= ~FD_POLL_IN;
@@ -411,7 +411,7 @@
if (!(b->flags & BF_WRITE_ACTIVITY))
goto out_skip_wakeup;
out_wakeup:
- task_wakeup(fdtab[fd].owner);
+ task_wakeup(fdtab[fd].owner, TASK_WOKEN_IO);
out_skip_wakeup:
fdtab[fd].ev &= ~FD_POLL_OUT;