summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorcheloha <cheloha@openbsd.org>2020-03-20 04:49:17 +0000
committercheloha <cheloha@openbsd.org>2020-03-20 04:49:17 +0000
commiteb550d275596aba28d64c251e7258bd13cd17570 (patch)
treed7ddef8aa8df070b44408ed2dabdfd3dfba7161d /sys/kern/kern_fork.c
parentkevent(2): tsleep(9) -> tsleep_nsec(9) (diff)
downloadwireguard-openbsd-eb550d275596aba28d64c251e7258bd13cd17570.tar.xz
wireguard-openbsd-eb550d275596aba28d64c251e7258bd13cd17570.zip
__thrsleep(2): fix absolute timeout check
An absolute timeout T elapses when the clock has reached time T, i.e. when T is less than or equal to the clock's current time. But the current code thinks T elapses only when the clock is strictly greater than T. For example, if my absolute timeout is 1.00000000, the current code will not return EWOULDBLOCK until the clock reaches 1.00000001. This is wrong: my absolute timeout elapses a nanosecond prior to that point. So the timespeccmp(3) here should be timespeccmp(tsp, &now, <=) and not timespeccmp(tsp, &now, <) as it is currently.
Diffstat (limited to 'sys/kern/kern_fork.c')
0 files changed, 0 insertions, 0 deletions