I’ve just noticed an unexpected behaviour of direct task notificiations:
- task blocks, waiting on a direct notification.
- during this wait, another task decides to temporarily suspend some tasks (including the one above).
- an ISR fires, which delivers the task notification being waited on in step 1.
- the task wakes up and runs, despite having been suspended.
This is not what I would have expected. The task is suspended, and should remain suspended until it is explicitly resumed (at which point the pending notification should be noted, and the task run). IMHO. It doesn’t seem right that delivering the notification does an implicit resume on the task.