{
int ret = 1;
fd_set rfds, wfds;
-#if USE_THREAD_ASSERT
- static __thread int already_here = 0;
-
- assert(!already_here);
- ++already_here;
-#endif
_xcb_assert_valid_sequence(c);
if(should_write ? c->out.writing : c->in.reading)
{
pthread_cond_wait(cond, &c->iolock);
-#if USE_THREAD_ASSERT
- --already_here;
-#endif
return 1;
}
--c->out.writing;
--c->in.reading;
-#if USE_THREAD_ASSERT
- --already_here;
-#endif
- return ret;
+ return ret > 0;
}