diff options
| author | 2019-06-21 09:39:48 +0000 | |
|---|---|---|
| committer | 2019-06-21 09:39:48 +0000 | |
| commit | edc99bcd885f4004d6cffdbe82f15aa2eb27ee9c (patch) | |
| tree | 90a5c776fe52a9672304a33b0ce308c3c1f7763f /sys/kern/init_main.c | |
| parent | Use timeout_add_msec(9) (diff) | |
| download | wireguard-openbsd-edc99bcd885f4004d6cffdbe82f15aa2eb27ee9c.tar.xz wireguard-openbsd-edc99bcd885f4004d6cffdbe82f15aa2eb27ee9c.zip | |
Make resource limit access MP-safe. So far, the copy-on-write sharing
of resource limit structs has been done between processes. By applying
copy-on-write also between threads, threads can read rlimits in
a nearly lock-free manner.
Inspired by code in DragonFly BSD and FreeBSD.
OK mpi@, agreement from jmatthew@ and anton@
Diffstat (limited to 'sys/kern/init_main.c')
| -rw-r--r-- | sys/kern/init_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index b4bacaae1b7..a6a2b6da51e 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.289 2019/06/20 14:55:22 anton Exp $ */ +/* $OpenBSD: init_main.c,v 1.290 2019/06/21 09:39:48 visa Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -373,7 +373,7 @@ main(void *framep) cpu_configure(); /* Configure virtual memory system, set vm rlimits. */ - uvm_init_limits(p); + uvm_init_limits(&limit0); /* Per CPU memory allocation */ percpu_init(); |
