API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

CALLBACK_CANCEL()

Brew Release
Brew MP 1.0.2
See Also
None
Description

This macro cancels a pending notification.
If the callback is currently scheduled somewhere (in other words, queued to be eventually called) then CALLBACK_Cancel() will de-schedule the callback.
If the callback is not currently scheduled, CALLBACK_Cancel() will do nothing.
Params
pcb
[]:
pointer to the AEECallback to set up
Evaluation
Side Effect
  • None
Definition
  •    CALLBACK_Cancel(pcb)    if (0 != (pcb)->pfnCancel) (pcb)->pfnCancel(pcb)
    
Comments
Setting up the cancel function is the responsibility of the object that is queueing the operation (the object implementing the API that promised to eventually call the callback). For example, ISHELL_Resume() places the callback on a list of ready callbacks and sets the cancel function to a function that will remove the callback from that list. Similarly, clearing the cancel function during a cancel callback or before calling the notify function is* also* the responsibility of the object queueing the operation. For example, in the case of ISHELL_Resume(), when a callback reaches the head of the ready list, it is taken out of the list and the cancel function is set to NULL before the notify function is called.