From 3534efe77cdb565b49df4d10f45a5f1b8f905e71 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 3 Dec 1993 03:22:41 +0000 Subject: Formerly verify_user_conch.c.~2~ --- libiohelp/verify_user_conch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libiohelp/verify_user_conch.c b/libiohelp/verify_user_conch.c index 180d132f..b7a1e506 100644 --- a/libiohelp/verify_user_conch.c +++ b/libiohelp/verify_user_conch.c @@ -15,6 +15,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include + error_t verify_user_conch (struct conch *c, void *user) { @@ -24,10 +27,12 @@ verify_user_conch (struct conch *c, void *user) return EPERM; user_sh = c->holder_shared_page; spin_lock (&user_sh->lock); - if (user_sh != USER_HAS_CONCH && user_sh != USER_RELEASE_CONCH) + if (user_sh->conch_status != USER_HAS_CONCH + && user_sh->conch_status != USER_RELEASE_CONCH) { spin_unlock (&user_sh->lock); return EPERM; } spin_unlock (&user_sh->lock); + return 0; } -- cgit v1.2.3