Commit b68878ff authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

block: doxify block_FifoNew() and block_FifoRelease()

parent 613ea43a
...@@ -522,6 +522,11 @@ struct block_fifo_t ...@@ -522,6 +522,11 @@ struct block_fifo_t
bool b_force_wake; bool b_force_wake;
}; };
/**
* Creates a thread-safe FIFO queue of blocks.
* See also block_FifoPut() and block_FifoGet().
* @return the FIFO or NULL on memory error
*/
block_fifo_t *block_FifoNew( void ) block_fifo_t *block_FifoNew( void )
{ {
block_fifo_t *p_fifo = malloc( sizeof( block_fifo_t ) ); block_fifo_t *p_fifo = malloc( sizeof( block_fifo_t ) );
...@@ -539,6 +544,10 @@ block_fifo_t *block_FifoNew( void ) ...@@ -539,6 +544,10 @@ block_fifo_t *block_FifoNew( void )
return p_fifo; return p_fifo;
} }
/**
* Destroys a FIFO created by block_FifoNew().
* Any queued blocks are also destroyed.
*/
void block_FifoRelease( block_fifo_t *p_fifo ) void block_FifoRelease( block_fifo_t *p_fifo )
{ {
block_FifoEmpty( p_fifo ); block_FifoEmpty( p_fifo );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment