Can I use task notification when stream buffer are being used by the same task?
I notice in the stream buffer there code like the one shown below. If this is the case this will complete remove all the bits set.
I am asking because I am running into problems where one my task is missing events and it’s because the task notification bits are cleared before I get a chance to read it.
Edit:
I can confirm that this is the reason why my task is not get the task notification. The stream buffer is clearing the events. If I stop using stream buffer everything is fine.
I am not sure if this is a bug or a documentaton doesn’t correctly indicate this.
If I remember right, there is a hook macro to allow you to define how the stream buffer use notifications to wake the awaiting task. You could provide an implementaton that uses one particular bit instead of the whole event word.
In the stream_buffer.h file, there are mentions to macros like sbSEND_COMPLETED which look to provide some hook for this sort of action. I don’t see a macro hook for the other side, so maybe this functionality is incomplete.
It looks like the hooks are called in some places but not in others places. May I suggest in new release to update the documentation just to indicate that when stream buffer are used task notification cannot be used.
Might help the next developer running into problems
The code was changed recently so the notification being sent within the
stream buffer code didn’t change the notification value, but it still
does set the notification pending. I’m not sure if that update is in
V10.0.1, which is released, or just in the public SVN repo at this time.