Function fifo_inject

Function Documentation

status_t fifo_inject(struct fifo *fifo, void (*f)(void *e, void *res), void *result)

Compute a cumulative SOMETHING over all elements of a FIFO.

Parameters:
  • fifo – The FIFO handle.

  • f – A function point which will be called for every element in the FIFO. This function CAN modify FIFO elements.

  • result – The initial value for the cumulative SOMETHING to be computed. This will be passed to each invocation of the callback.

Returns:

status_t.