main.c
/*
 * Read the next entity from the parser process, removing it from the
 * queue of pending requests in the process.
 * This always returns a valid entity.
 */
Read the next entity from the parser process, removing it from the
queue of pending requests in the process.
This always returns a valid entity.
Read the next entity from the parser process removing it from the queue of pending requests in the process . This always returns a valid entity .
static struct entity *
entityq_next(int fd, struct entityq *q)
{
	size_t		 id;
	struct entity	*entp;
	io_simple_read(fd, &id, sizeof(size_t));
	TAILQ_FOREACH(entp, q, entries)
		if (entp->id == id)
			break;
	assert(entp != NULL);
	TAILQ_REMOVE(q, entp, entries);
	return entp;
}
static struct entity * entityq_next ( int fd , struct entityq * q ) { size_t id ; struct entity * entp ; io_simple_read ( fd , & id , sizeof ( size_t ) ) ; TAILQ_FOREACH ( entp , q , entries ) if ( entp -> id == id ) break ; assert ( entp != NULL ) ; TAILQ_REMOVE ( q , entp , entries ) ; return entp ; }
Read the next entity from the parser process, removing it from the
 queue of pending requests in the process.
Read the next entity from the parser process removing it from the queue of pending requests in the process .