diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-09-21 01:09:11 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-09-21 01:09:11 +0000 |
commit | aec49b06efd518437143ea082ebc3444b205f905 (patch) | |
tree | 519a11628903805f9d127bb601f4e36b25cb8bd9 /sys/kern/subr_pool.c | |
parent | 134cdfb67d09790ddb041cb0c8a22ddd7fc6e166 (diff) |
Add assertwaitok(9) to declare code paths that assume they can sleep.
Currently only checks that we're not in an interrupt context, but will
soon check that we're not holding any mutexes either.
Update malloc(9) and pool(9) to use assertwaitok(9) as appropriate.
"i like it" art@, oga@, marco@; "i see no harm" deraadt@; too trivial
for me to bother prying actual oks from people.
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r-- | sys/kern/subr_pool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 4516c2c1bc9..5b9a354e423 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.96 2010/07/03 03:04:55 tedu Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.97 2010/09/21 01:09:10 matthew Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -455,7 +455,7 @@ pool_get(struct pool *pp, int flags) #ifdef DIAGNOSTIC if ((flags & PR_WAITOK) != 0) - splassert(IPL_NONE); + assertwaitok(); #endif /* DIAGNOSTIC */ mtx_enter(&pp->pr_mtx); |