diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2023-02-10 14:34:18 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2023-02-10 14:34:18 +0000 |
commit | 04d3413ff78e66f127de3749e6564ba940ff320e (patch) | |
tree | 8d0adc2e66658136bd528d87b27b8bce64fce574 /sys/kern/kern_fork.c | |
parent | 36d295960f2bd4394d4ae7685b11fcb6cdf82d9f (diff) |
Adjust knote(9) API
Make knote(9) lock the knote list internally, and add knote_locked(9)
for the typical situation where the list is already locked.
Remove the KNOTE(9) macro to simplify the API.
Manual page OK jmc@
OK mpi@ mvs@
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index ccdd34aafb8..f0f279d9f64 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.245 2023/01/07 05:24:58 guenther Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.246 2023/02/10 14:34:17 visa Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -465,7 +465,7 @@ fork1(struct proc *curp, int flags, void (*func)(void *), void *arg, /* * Notify any interested parties about the new process. */ - KNOTE(&curpr->ps_klist, NOTE_FORK | pr->ps_pid); + knote_locked(&curpr->ps_klist, NOTE_FORK | pr->ps_pid); /* * Update stats now that we know the fork was successful. |