diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-12-08 12:37:46 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-12-08 12:37:46 +0000 |
commit | e335fcbf89f87f09e3c9710ad610894171b40f3f (patch) | |
tree | 9dcb62350b365b99c49b891112a2b36434b072c9 /sys | |
parent | 63a00d104d5b5b9c41cd7b75f97d3eff691e7792 (diff) |
Convert infinite sleeps to {m,t}sleep_nsec(9).
ok visa@, jca@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_device.c | 5 | ||||
-rw-r--r-- | sys/uvm/uvm_fault.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_pager.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_pmemrange.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_vnode.c | 4 |
6 files changed, 14 insertions, 13 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index 3936cf0f346..4a790266ae4 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_device.c,v 1.56 2019/07/18 23:47:33 cheloha Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.57 2019/12/08 12:37:45 mpi Exp $ */ /* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */ /* @@ -243,7 +243,8 @@ again: * lock interleaving. -- this is ok in this case since the * locks are both IPL_NONE */ - msleep(udv, &udv_lock, PVM | PNORELOCK, "udv_detach", 0); + msleep_nsec(udv, &udv_lock, PVM | PNORELOCK, "udv_detach", + INFSLP); goto again; } diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index f37418701dc..0cedd6d6c4a 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.96 2019/07/18 23:47:33 cheloha Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.97 2019/12/08 12:37:45 mpi Exp $ */ /* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */ /* @@ -1029,7 +1029,7 @@ Case2: KASSERT(result != VM_PAGER_PEND); if (result == VM_PAGER_AGAIN) { - tsleep(&lbolt, PVM, "fltagain2", 0); + tsleep_nsec(&lbolt, PVM, "fltagain2", INFSLP); goto ReFault; } diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index 17007f46197..f9ec890670e 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.132 2019/07/18 23:47:33 cheloha Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.133 2019/12/08 12:37:45 mpi Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -581,7 +581,7 @@ uvm_km_valloc_prefer_wait(struct vm_map *map, vsize_t size, voff_t prefer) } /* failed. sleep for a while (on map) */ - tsleep(map, PVM, "vallocwait", 0); + tsleep_nsec(map, PVM, "vallocwait", INFSLP); } /*NOTREACHED*/ } @@ -909,7 +909,7 @@ try_map: kv->kv_align, UVM_MAPFLAG(prot, prot, MAP_INHERIT_NONE, MADV_RANDOM, mapflags))) { if (kv->kv_wait && kd->kd_waitok) { - tsleep(map, PVM, "km_allocva", 0); + tsleep_nsec(map, PVM, "km_allocva", INFSLP); goto try_map; } uvm_pglistfree(&pgl); diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c index b5aa6c9dcdf..8f5fba0eacd 100644 --- a/sys/uvm/uvm_pager.c +++ b/sys/uvm/uvm_pager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pager.c,v 1.71 2014/12/17 19:42:15 tedu Exp $ */ +/* $OpenBSD: uvm_pager.c,v 1.72 2019/12/08 12:37:45 mpi Exp $ */ /* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */ /* @@ -166,7 +166,7 @@ pager_seg_restart: pager_seg_fail: if ((flags & UVMPAGER_MAPIN_WAITOK) != 0) { - msleep(&psegs, &uvm_pseg_lck, PVM, "pagerseg", 0); + msleep_nsec(&psegs, &uvm_pseg_lck, PVM, "pagerseg", INFSLP); goto pager_seg_restart; } diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c index 7d9e2a52b67..4bcbe4e2f4e 100644 --- a/sys/uvm/uvm_pmemrange.c +++ b/sys/uvm/uvm_pmemrange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmemrange.c,v 1.55 2019/07/03 22:39:33 cheloha Exp $ */ +/* $OpenBSD: uvm_pmemrange.c,v 1.56 2019/12/08 12:37:45 mpi Exp $ */ /* * Copyright (c) 2009, 2010 Ariane van der Steldt <ariane@stack.nl> @@ -1946,7 +1946,7 @@ uvm_wait_pla(paddr_t low, paddr_t high, paddr_t size, int failok) wakeup(&uvm.pagedaemon); /* wake the daemon! */ while (pma.pm_flags & (UVM_PMA_LINKED | UVM_PMA_BUSY)) - msleep(&pma, &uvm.fpageqlock, PVM, wmsg, 0); + msleep_nsec(&pma, &uvm.fpageqlock, PVM, wmsg, INFSLP); if (!(pma.pm_flags & UVM_PMA_FREED) && pma.pm_flags & UVM_PMA_FAIL) { diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 78e972a2b53..dbb18ac4c9f 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.104 2019/07/18 23:47:33 cheloha Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.105 2019/12/08 12:37:45 mpi Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */ /* @@ -1236,7 +1236,7 @@ uvn_io(struct uvm_vnode *uvn, vm_page_t *pps, int npages, int flags, int rw) return(VM_PAGER_OK); } else { while (rebooting) - tsleep(&rebooting, PVM, "uvndead", 0); + tsleep_nsec(&rebooting, PVM, "uvndead", INFSLP); return(VM_PAGER_ERROR); } } |