summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2020-01-23 14:39:00 +0000
committercheloha <cheloha@cvs.openbsd.org>2020-01-23 14:39:00 +0000
commit808c44fe1f88fe05ce4bca04a0759e4cf1d4549f (patch)
tree627a188c46a8789480852f5d0f20b6a3c5e88f7c /sys
parent493db8f932b66456ae9311ff1d170477fa59672e (diff)
pool(9): pl_sleep(): drop unused timeout argument
All sleeps have been indefinite since introduction of this interface ~5 years ago, so remove the timeout argument and make indefinite sleeps implicit. While here: *sleep(9) -> *sleep_nsec(9) "i don't think we're going to use timeouts [here]" tedu@, ok mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_pool.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 6a2b38fca81..ede0cb45382 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.228 2019/07/19 09:03:03 bluhm Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.229 2020/01/23 14:38:59 cheloha Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -83,7 +83,7 @@ struct pool_lock_ops {
void (*pl_leave)(union pool_lock *);
void (*pl_assert_locked)(union pool_lock *);
void (*pl_assert_unlocked)(union pool_lock *);
- int (*pl_sleep)(void *, union pool_lock *, int, const char *, int);
+ int (*pl_sleep)(void *, union pool_lock *, int, const char *);
};
static const struct pool_lock_ops pool_lock_ops_mtx;
@@ -125,9 +125,9 @@ pl_assert_unlocked(struct pool *pp, union pool_lock *pl)
}
static inline int
pl_sleep(struct pool *pp, void *ident, union pool_lock *lock, int priority,
- const char *wmesg, int timo)
+ const char *wmesg)
{
- return pp->pr_lock_ops->pl_sleep(ident, lock, priority, wmesg, timo);
+ return pp->pr_lock_ops->pl_sleep(ident, lock, priority, wmesg);
}
struct pool_item {
@@ -602,7 +602,7 @@ pool_get(struct pool *pp, int flags)
pl_enter(pp, &mem.lock);
while (mem.v == NULL)
- pl_sleep(pp, &mem, &mem.lock, PSWP, pp->pr_wchan, 0);
+ pl_sleep(pp, &mem, &mem.lock, PSWP, pp->pr_wchan);
pl_leave(pp, &mem.lock);
v = mem.v;
@@ -2227,9 +2227,9 @@ pool_lock_mtx_assert_unlocked(union pool_lock *lock)
int
pool_lock_mtx_sleep(void *ident, union pool_lock *lock, int priority,
- const char *wmesg, int timo)
+ const char *wmesg)
{
- return msleep(ident, &lock->prl_mtx, priority, wmesg, timo);
+ return msleep_nsec(ident, &lock->prl_mtx, priority, wmesg, INFSLP);
}
static const struct pool_lock_ops pool_lock_ops_mtx = {
@@ -2281,9 +2281,9 @@ pool_lock_rw_assert_unlocked(union pool_lock *lock)
int
pool_lock_rw_sleep(void *ident, union pool_lock *lock, int priority,
- const char *wmesg, int timo)
+ const char *wmesg)
{
- return rwsleep(ident, &lock->prl_rwlock, priority, wmesg, timo);
+ return rwsleep_nsec(ident, &lock->prl_rwlock, priority, wmesg, INFSLP);
}
static const struct pool_lock_ops pool_lock_ops_rw = {