View topic - Signals Vs Pulses

Signals Vs Pulses

Discussion about the general applications that run on QNX6

Signals Vs Pulses

Postby Subu » Wed Dec 01, 2010 6:41 am

Hi,

I would like to know the following

1) Is there any difference between signals (POSIX) and pulses in QNX? I don't find any difference between them in the way it operates

2) What happens when the threads on blocked on "MsgReceive()()"/"MsgSend() if we receive the signals?

For example: The process AB contains two threads A and B and assume that they are in BLOCKED state not READY
Thread A is blocked on "MsgReceive()"
Thread B is blocked on "MsgSend()
What would happen to process AB and the threads if it receives signal?

thanks,
subu
Subu
Active Member
 
Posts: 24
Joined: Thu Sep 08, 2005 2:55 pm

RE: Signals Vs Pulses

Postby mario » Wed Dec 01, 2010 2:07 pm

1 ) Oh another case of RTFM. There are huge differences, signals can't get queued, signals don't have any payload, signals can't make it accros the network, signals don't have priorities. Pulses don't interrupt flow of code.

2 ) In both cases the fonction will get interrupted, return -1 and set errno to EINTR. A process that is blocked cannot be in any other state ( READY).
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: Signals Vs Pulses

Postby Subu » Thu Dec 02, 2010 6:12 am

Thanks Mario for the explanation.
Will the server be informed if client unblocks due to signals? For example: client is SEND/REPLY blocked and receives the signal. As you mentioned MsgSend() would return -1 and will it inform the server (listening on MsgReceive()) that Sender is unblocked as server has not replied to client using MsgReply()

Please clarify
thanks
Subu
Active Member
 
Posts: 24
Joined: Thu Sep 08, 2005 2:55 pm

RE: Signals Vs Pulses

Postby maschoen » Thu Dec 02, 2010 7:07 pm

If a client is SEND blocked on a server and gets a signal, the server is not informed. There's no reason to.

If a client is REPLY blocked on a server, the server can get a PULSE indicating this event. The signal does not take affect until the server replies. The server does not have to reply immediately although it is bad form not to.
maschoen
QNX Master
 
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm


Return to QNX6 - Applications

Who is online

Users browsing this forum: No registered users and 2 guests

cron