Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The number of OS_MSG entries freed from the message queue. Note that the OS_MSG entries are returned to the free pool of OS_MSGs.

Notes/Warnings

  • Queues must be created before they are used.
  • Use this function with great care. When flushing a queue, you lose the references to what the queue entries are pointing to, potentially causing 'memory leaks'. The data that the user is pointing to that is referenced by the queue entries should, most likely, be de-allocated (i.e., freed).

Example

or, to flush a queue that contains entries, instead you can use OSQPend() and specify the OS_OPT_PEND_NON_BLOCKING option.