From b283a297e703c44499f8053d6fe9bd6f012b376e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 1 Feb 1996 01:05:53 +0000 Subject: Add assert to check for signal bug. --- libthreads/cancel-cond.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libthreads') diff --git a/libthreads/cancel-cond.c b/libthreads/cancel-cond.c index 317b7244..b7780d03 100644 --- a/libthreads/cancel-cond.c +++ b/libthreads/cancel-cond.c @@ -1,5 +1,5 @@ /* Modified condition_wait that checks for cancellation. -Copyright (C) 1995 Free Software Foundation, Inc. +Copyright (C) 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */ #include #include #include "cthread_internals.h" +#include /* Just like condition_wait, but cancellable. Returns true if cancelled. */ int @@ -36,6 +37,8 @@ hurd_condition_wait (condition_t c, mutex_t m) cproc_t p = cproc_self (); int cancel; + assert (ss->intr_port == MACH_PORT_NULL); /* Sanity check for signal bugs. */ + p->state = CPROC_CONDWAIT | CPROC_SWITCHING; /* Atomically enqueue our cproc on the condition variable's queue of -- cgit v1.2.3