Hello,
I think I suffer again from sorta "bombarding case".
In my last project "smart controller for pad printing machine" I use 7 tasks and 6 events. Processor 16F877, 7.5 Kb memory used.
The system works smooth and fine, except that from time to time it hangs (reset from WDT). When I removed WDT - everything is fine and no visible problems occured.
I found in the manual that the behavior of OS_WaitXYS is described as:
... if the event is already signalled it returns the control to the task.
Imagine that you have 10 OS_WaitXYZ one after other for 10 different events and all events are already signalled. If I understand SALVO , the task will not contex switch at all. And if these operators are in loop it's possible "deadlock" or at least (like in my case) to hold the control into one task too long.
That means:
1. Or the manual is not updated with "bombarding case" info
2. Bombarding case still exists, when many OS_WaitXYZ are one after other. It's extremely dangerous case, because you can not mark the problem immediately, but after some time... could be years. And for sure all you'll say will be - noises from the line. In fact this could be named like the extremely high waves in the ocean, so called "solitons". SOmething like interference of bad events - one chain of working OS_WaitXYZ in one moment becomes "dead lock", like several waves together could make "soliton"
I know that this behaviour (sometimes contex switch, sometimes not) is made for speeding the service. I think that will be OK, if the user could alone chose the behaviour - speed or normal OS_WaitXYZ service. I don't say that all OS_WaitXYZ should first contex switch and then check events, but sometimes it's just neccesary to do so.
Tomorrow I'll locate the problem with simple adding OS_Yield before the operators. I'll keep you in touch. Oh, If was some option like OSWAITXYZ_BEHAVIOUR SPEED/SWITCH.....
Best regards
Luben