Skip to content
Snippets Groups Projects
Commit 404c4650 authored by rswindell's avatar rswindell
Browse files

Eliminate again yet another unnecessary call to RingBufFull().

parent 40769053
No related branches found
No related tags found
No related merge requests found
......@@ -1516,12 +1516,12 @@ void output_thread(void* arg)
/* Wait for full buffer or drain timeout */
if(sbbs->outbuf.highwater_mark) {
if(avail<sbbs->outbuf.highwater_mark)
if(avail<sbbs->outbuf.highwater_mark) {
sem_trywait_block(&sbbs->outbuf.highwater_sem,startup->outbuf_drain_timeout);
else
/* We (potentially) blocked, so get fill level again */
avail=RingBufFull(&sbbs->outbuf);
} else
sem_trywait(&sbbs->outbuf.highwater_sem);
/* We (potentially) blocked, so get fill level again */
avail=RingBufFull(&sbbs->outbuf);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment