bitset: Swap pthread_cond_broadcast for pthread_cond_signal

Normally we'll only have one thread waiting anyway, but there's no
point activating a race here in the cases where we have > 1 waiting,
so signal is what we want.
This commit is contained in:
nick
2013-09-24 15:28:58 +01:00
parent 4b9ded0e1d
commit 6986c70888

View File

@@ -226,7 +226,7 @@ static inline void bitset_stream_enqueue(
stream->in %= BITSET_STREAM_SIZE;
pthread_mutex_unlock( & stream->mutex );
pthread_cond_broadcast( &stream->cond_not_empty );
pthread_cond_signal( &stream->cond_not_empty );
return;
}
@@ -259,7 +259,7 @@ static inline void bitset_stream_dequeue(
stream->out %= BITSET_STREAM_SIZE;
pthread_mutex_unlock( &stream->mutex );
pthread_cond_broadcast( &stream->cond_not_full );
pthread_cond_signal( &stream->cond_not_full );
return;
}