I have a situation where the programme counter(PC) shows
that vxworks msgQreceive function has been called by task A
and Q is full, still I am not picking up the messages. There
is no other task registered to receive messages from this Q.
The sending task B, which is ISR in this case, is getting
timedout everytime it tries posting new message in it. A's
state is PEND which means I am waiting for some resource to
get free but PC shows I have called vxworks msgQReceive and
currently at qJobget+0x018 location. There seems to be two
causes now(identified by me): either vxworks qjobget task is
not able to do semTake or no messages in Q. But Q is full
and semTake failure seems unlikely(though I dont have a
mechanism to check so).

Besides explaining root cause for above, can anyone suggest
how to get my task in READY state again? I also tried
flushing the Q; on doing this, more messages get posted in Q
but A still doesnt pick up any :(

Answer Posted / sandy

Its been a while since I worked with VxWorks platform, but
what I suspect is that it may be a basic implementation
problem and nothing to do with the VxWorks routine. I would
expect that such basic issues in the OS primitives to be
already solved by the vendor(at least for this one, given
the price we pay). It may not be reasonable to suspect the
implementation of this basic OS service.
1. Very simple way to debug would be to write a task that
only reads from this queue and does nothing else. Do not
copy the code from the task being debugged, write afresh.
It is very easy to have overlooked a seemingly good but
trivial coding error.

2. It is highly likely that the que that u are examining is
a different que than the task is trying to read from. There
are may ways this can happen, one of which -- Do you use
any task variables? why I ask is that, the qID that you are
using to read() may be a task variable OR part of a
datablock that is implemented in a 'task variable' way.
Though the same global variable name, it would be a
different memory.

3. If you have already figured out the issue, please share
with us:-)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category