summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2020-10-15 04:28:44 +0000
committercheloha <cheloha@cvs.openbsd.org>2020-10-15 04:28:44 +0000
commit8bece5dca54aab05fc9a9241c41963a2e9a34428 (patch)
tree816d9df84d52c28ca8374fcfde9c890b4be3f9c1 /lib
parent5253e1fae234498e63f80a5aeef4d2e1f5de1829 (diff)
_exit(2), execve(2): cancel per-process interval timers safely
During _exit(2) and sometimes during execve(2) we need to cancel any active per-process interval timers. We don't currently do this in an MP-safe way. Both syscalls ignore the locking assumptions documented in proc.h. The easiest way to make them MP-safe is to use setitimer(), just like the getitimer(2) and setitimer(2) syscalls do. To make things a bit cleaner I have added a helper function, cancelitimer(), so the callers don't need to fuss with an itimerval struct. While we're here we can remove the splclock/splx dance from execve(2). It is no longer necessary. ok deraadt@
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions