Reply blocked on pid 0.

hi,

i have one simple program, which runs in an infinite while loop. It also
has a Creceive statmemnt which receives timer proxies attached to it at
an interval of 500 miliseconds and it also has the delay of 300
miliseconds.

I have observerd that sometimes SIN reports program to be in REPLY blocked
state on PID 0.

1)What is the state of the program when it is executing in CRECEIVE ?
2) If the state is RECEIVE blocked while executing CRECEIVE when does the
program gets REPLY blocked on PID 0.


Pseudocode :

Create timer with 500 milisecnds.

while ()
{
Creceive (TimerProxyPid, 0, 0)

printf (" Received timer proxy");
delay (300);
}


Thanx.

kedar

Creceive() does not block. The reply blocked on 0 is from the
delay(300) - quite normal.

Richard

Staff wrote:

hi,

i have one simple program, which runs in an infinite while loop. It also
has a Creceive statmemnt which receives timer proxies attached to it at
an interval of 500 miliseconds and it also has the delay of 300
miliseconds.

I have observerd that sometimes SIN reports program to be in REPLY blocked
state on PID 0.

1)What is the state of the program when it is executing in CRECEIVE ?
2) If the state is RECEIVE blocked while executing CRECEIVE when does the
program gets REPLY blocked on PID 0.

Pseudocode :

Create timer with 500 milisecnds.

while ()
{
Creceive (TimerProxyPid, 0, 0)

printf (" Received timer proxy");
delay (300);
}

Thanx.

kedar

“Staff” <seto@vsnl.com> wrote in message news:ak2oku$meb$1@inn.qnx.com

hi,

i have one simple program, which runs in an infinite while loop. It also
has a Creceive statmemnt which receives timer proxies attached to it at
an interval of 500 miliseconds and it also has the delay of 300
miliseconds.

I have observerd that sometimes SIN reports program to be in REPLY blocked
state on PID 0.

1)What is the state of the program when it is executing in CRECEIVE ?
2) If the state is RECEIVE blocked while executing CRECEIVE when does the
program gets REPLY blocked on PID 0.


Pseudocode :

Create timer with 500 milisecnds.

while ()
{
Creceive (TimerProxyPid, 0, 0)

printf (" Received timer proxy");
delay (300);
}


I’m assuming this is for testing? Why do a CReceive follow by a delay?



Thanx.

kedar
\

Because without it you have a CPU loop?

inn.qnx.compostmaster@127.0.0.1 wrote in message
news:ak5162$cts$1@inn.qnx.com

I’m assuming this is for testing? Why do a CReceive follow by a delay?

Thanx.

kedar

“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:ak5oqp$sed$1@inn.qnx.com

Because without it you have a CPU loop?

Hence the question, why use CReceive and not just Receive?

inn.qnx.compostmaster@127.0.0.1 wrote in message
news:ak5162$cts$> 1@inn.qnx.com> …


I’m assuming this is for testing? Why do a CReceive follow by a delay?

Thanx.

kedar

Staff <seto@vsnl.com> wrote:

hi,

i have one simple program, which runs in an infinite while loop. It also
has a Creceive statmemnt which receives timer proxies attached to it at
an interval of 500 miliseconds and it also has the delay of 300
miliseconds.

I have observerd that sometimes SIN reports program to be in REPLY blocked
state on PID 0.

sleep()/delay()/other functions show this as their blocking state while
waiting to time out.

1)What is the state of the program when it is executing in CRECEIVE ?

READY

  1. If the state is RECEIVE blocked while executing CRECEIVE when does the
    program gets REPLY blocked on PID 0.

your delay() call.

-David

Pseudocode :

Create timer with 500 milisecnds.

while ()
{
Creceive (TimerProxyPid, 0, 0)

printf (" Received timer proxy");
delay (300);
}



Thanx.

kedar



QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.