summaryrefslogtreecommitdiff
path: root/libthreads/cancel-cond.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-02-01 01:05:53 +0000
committerRoland McGrath <roland@gnu.org>1996-02-01 01:05:53 +0000
commitb283a297e703c44499f8053d6fe9bd6f012b376e (patch)
tree63f2ebc45f7429114dbd131754271680378808a9 /libthreads/cancel-cond.c
parent83e23f328715aa992d488efba71f9c0c887ac12b (diff)
Add assert to check for signal bug.
Diffstat (limited to 'libthreads/cancel-cond.c')
-rw-r--r--libthreads/cancel-cond.c5
1 files changed, 4 insertions, 1 deletions
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 <hurd/signal.h>
#include <cthreads.h>
#include "cthread_internals.h"
+#include <assert.h>
/* 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