Skip to content

Commit 5e8dec2

Browse files
author
Daniel Stodden
committed
PR-1129: Enforce masked state.
Masking timeout events only skips timeval calculation, but doesn't prevent them from anyway as they expired. Enforce masked state right around the callback. For timeouts, this means the event will keep ticking at the interval given. Signed-off-by: Daniel Stodden <[email protected]>
1 parent ff58d5f commit 5e8dec2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scheduler.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ scheduler_event_callback(event_t *event, char mode)
200200
event->deadline = now.tv_sec + event->timeout;
201201
}
202202

203-
event->cb(event->id, mode, event->private);
203+
if (!event->masked)
204+
event->cb(event->id, mode, event->private);
204205
}
205206

206207
static int

0 commit comments

Comments
 (0)