add a _kernel_locked_p().
This commit is contained in:
parent
3654664ee4
commit
c1d02dab7b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: klock.c,v 1.3 2010/12/01 14:59:38 pooka Exp $ */
|
||||
/* $NetBSD: klock.c,v 1.4 2012/02/20 22:35:14 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.3 2010/12/01 14:59:38 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.4 2012/02/20 22:35:14 mrg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -117,6 +117,13 @@ _kernel_unlock(int nlocks, int *countp)
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
_kernel_locked_p(void)
|
||||
{
|
||||
|
||||
return giantowner == curlwp;
|
||||
}
|
||||
|
||||
void
|
||||
rump_user_unschedule(int nlocks, int *countp, void *interlock)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user