mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 15:30:50 +00:00
[qwaq] Correct some queue test logic
This fixes the wedge during initial setup and drawing, but the program deadlocks when processing input and there's an event.
This commit is contained in:
parent
abedb465af
commit
fb17f8093d
1 changed files with 2 additions and 2 deletions
|
@ -242,7 +242,7 @@ acquire_string (qwaq_resources_t *res)
|
|||
int string_id = -1;
|
||||
|
||||
pthread_mutex_lock (&res->string_id_cond.mut);
|
||||
while (!RB_DATA_AVAILABLE (res->string_ids)) {
|
||||
while (RB_DATA_AVAILABLE (res->string_ids) < 1) {
|
||||
pthread_cond_wait (&res->string_id_cond.rcond,
|
||||
&res->string_id_cond.mut);
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ static void
|
|||
release_string (qwaq_resources_t *res, int string_id)
|
||||
{
|
||||
pthread_mutex_lock (&res->string_id_cond.mut);
|
||||
while (RB_SPACE_AVAILABLE (res->string_ids)) {
|
||||
while (RB_SPACE_AVAILABLE (res->string_ids) < 1) {
|
||||
pthread_cond_wait (&res->string_id_cond.wcond,
|
||||
&res->string_id_cond.mut);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue