Page 1 of 1

tasks not resuming after being signaled

PostPosted: Mon Mar 13, 2006 5:49 am
by tyski
I believe I have found a problem somewhere in the source code, however, I am having a really hard time narrowing it down. So let me describe what I've seen and maybe you can tell me where to look.

Some pertinents I'm using:

- salvo pro for pic18 with c18
- timeouts enabled
- fast signaling disabled
- event services NOT combined
- speedup queueing enabled
- optimize for speed enabled

I have seen instances where a task can be waiting an event flag with no timeout, that event flag will be signaled (in such a way that the task should run), and yet the task will not continue execution. After inspecing Salvo's globals, I was able to determine that the task wasn't in any of the queues (not eligble, not signaled, not even in the event's queue) by inspecting its nextTcbP and working backwards (tedious, yes).

The problem only seems to manifest itself when "things are moving quickly", i.e. the same event is being signaled quickly from multiple places (ISRs and mainline code). When "things are moving slowly", I have not been able to recreate the problem.

I'm having a very hard time narrowing down exactly what causes the problem in terms of speed/location of event signaling. As such, I can't really create a situation to find it easily.

What I'm really looking for with this post is some idea of where to start looking for the problem in the Salvo source code.

My only real thought was that it was somehow related to the signaling of an event from an ISR while at the same time it was being signaled in mainline code. However, the signaling is done from within a critical section, so this doesn't make sense (it was just my only thought).

Tyrel

------------------
Tyrel Newton
Electrical Engineer

Tethers Unlimited, Inc.
11807 North Creek Parkway South, Suite B-102
Bothell, WA 98011-8804, USA
425-486-0100 x836 425-482-9670 FAX
newton@tethers.com
http://www.tethers.com/