| 1321 | } |
| 1322 | |
| 1323 | hb_buffer_t * hb_fifo_see_wait( hb_fifo_t * f ) |
| 1324 | { |
| 1325 | hb_buffer_t * b; |
| 1326 | |
| 1327 | hb_lock( f->lock ); |
| 1328 | if( f->size < 1 ) |
| 1329 | { |
| 1330 | f->wait_empty = 1; |
| 1331 | hb_cond_timedwait( f->cond_empty, f->lock, FIFO_TIMEOUT ); |
| 1332 | if( f->size < 1 ) |
| 1333 | { |
| 1334 | hb_unlock( f->lock ); |
| 1335 | return NULL; |
| 1336 | } |
| 1337 | } |
| 1338 | b = f->first; |
| 1339 | hb_unlock( f->lock ); |
| 1340 | |
| 1341 | return b; |
| 1342 | } |
| 1343 | |
| 1344 | // Returns the first packet in the specified FIFO. |
| 1345 | // If the FIFO is empty, returns NULL. |
nothing calls this directly
no test coverage detected