diff --git a/sys/rump/librump/rumpkern/klock.c b/sys/rump/librump/rumpkern/klock.c index 352b6fec9eba..2e20a9e77fbd 100644 --- a/sys/rump/librump/rumpkern/klock.c +++ b/sys/rump/librump/rumpkern/klock.c @@ -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 -__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 #include @@ -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) {