summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-01 16:57:29 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-01 16:57:29 +0000
commit8951cdfc28792b0a761269b1716ca50558ec7b7c (patch)
treea4beae075d86b1e02109b230c2df876c9efb09c5
parent2ba5e64c2b076dc57750885b68955cef639162a0 (diff)
entered into RCS
-rw-r--r--libpager/seqnos.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpager/seqnos.c b/libpager/seqnos.c
index 62db626d..94cce93b 100644
--- a/libpager/seqnos.c
+++ b/libpager/seqnos.c
@@ -16,28 +16,31 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "priv.h"
+#include <assert.h>
/* The message with seqno SEQNO has just been dequeued for pager P;
wait until all preceding messages have had a chance and then
return. */
void
_pager_wait_for_seqno (struct pager *p,
- int seqno)
+ int seqno)
{
while (seqno != p->seqno + 1)
{
p->waitingforseqno = 1;
condition_wait (&p->wakeup, &p->interlock);
}
- p->seqno = seqno;
}
/* Allow the next message for pager P (potentially blocked in
_pager_wait_for_seqno) to be handled. */
void
-_pager_release_seqno (struct pager *p)
+_pager_release_seqno (struct pager *p,
+ int seqno)
{
+ assert (seqno == p->seqno + 1);
+ p->seqno = seqno;
if (p->waitingforseqno)
{
p->waitingforseqno = 0;