View topic - Message Queue getting blocked

Message Queue getting blocked

For discussion of realtime and/or embedded programming.

Message Queue getting blocked

Postby wednesday » Wed Dec 08, 2010 5:01 am


I have developed an application in which one of the threads waits on a queue to read data. When i do pidin after running the app,it shows the thread in Reply state.However,after sometime the thread status changes to SEM and my thread doesnt wake up at all evebn if data is there on the queue. As a result,data gets depositing on queue and after sometime it becomes full. Would llike to know why does the thread go from Reply to sem state?Is it correct? Also,once it goes into sem state it never wakes up?
What could be the problem? Plz help.
Active Member
Posts: 48
Joined: Tue Apr 28, 2009 7:10 am

RE: Message Queue getting blocked

Postby maschoen » Wed Dec 08, 2010 3:54 pm

Are you sure that the mqueue read doesn't return? Are you using semaphores? When the thread is in Reply state it is waiting for mq or mqueue to reply. When data gets on the queue it probably does. I don't know why an mqueue routine would do a semaphore wait, so maybe your code is doing it?
QNX Master
Posts: 2682
Joined: Wed Jun 25, 2003 5:18 pm

Return to Realtime and Embedded

Who is online

Users browsing this forum: Google [Bot] and 5 guests