summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpj <rpj>2001-08-24 04:44:27 +0000
committerrpj <rpj>2001-08-24 04:44:27 +0000
commitdcc0da53c266b2e6c3d54892919112ee0106c88c (patch)
tree60ef9885c6463856cd3918452fbb36a7bdbcb5bd
parent882ec36f8d033e07d3bb272ee22554314226ea01 (diff)
* condvar.c (pthread_cond_destroy): Remove cv element
that is no longer used. * implement.h: Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--condvar.c3
-rw-r--r--implement.h1
3 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 024d2bd..ab8ab92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-24 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
+
+ * condvar.c (pthread_cond_destroy): Remove cv element
+ that is no longer used.
+ * implement.h: Likewise.
+
2001-08-23 Ross Johnson <rpj@setup1.ise.canberra.edu.au>
Contributed by - "Alexander Terekhov" <TEREKHOV@de.ibm.com>
diff --git a/condvar.c b/condvar.c
index ff1332e..e2d8801 100644
--- a/condvar.c
+++ b/condvar.c
@@ -495,7 +495,6 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr)
}
cv->nWaitersBlocked = 0;
- cv->nWaitersUnblocked = 0;
cv->nWaitersToUnblock = 0;
cv->nWaitersGone = 0;
@@ -658,7 +657,7 @@ pthread_cond_destroy (pthread_cond_t * cond)
/*
* Check whether cv is still busy (still has waiters)
*/
- if (cv->nWaitersBlocked - cv->nWaitersGone - cv->nWaitersUnblocked > 0)
+ if (cv->nWaitersBlocked > cv->nWaitersGone)
{
if (sem_post(&(cv->semBlockLock)) != 0)
{
diff --git a/implement.h b/implement.h
index 080d9a1..5c1d7ec 100644
--- a/implement.h
+++ b/implement.h
@@ -219,7 +219,6 @@ struct ThreadParms {
struct pthread_cond_t_ {
long nWaitersBlocked; /* Number of threads blocked */
long nWaitersGone; /* Number of threads timed out */
- long nWaitersUnblocked; /* Number of threads unblocked */
long nWaitersToUnblock; /* Number of threads to unblock */
sem_t semBlockQueue; /* Queue up threads waiting for the */
/* condition to become signalled */