I’m actually trying to port a QNX4 programme with the following
structure:
forever
{
if(busy_work_to_do)
time_val = 0;
else
time_val = 10s;
select(…,time_val)
/*
** Standard select handling
*/
if(timer_expired && busy_work_to_do)
DoWork();
}
pid_t _select_receive(pid_t proxy)
{
Receive();
/*
** … as from the docs
*/
}
I’m not sure how to port this to QNX6.
Can I combine a select() and a message_attach(), such like:
name_attach()
message_attach(,my_message_handler)
forever
{
if(busy_work_to_do)
time_val = 0;
else
time_val = 10s;
select(…,time_val)
/*
** Standard select handling
*/
if(timer_expired && busy_work_to_do)
DoWork();
}
What do I need the message type ‘range’ in ‘message_attach()’ for?
I couldn’t find any place, where I could use a message type for
sending, or is it the first word in the message itself?
Thanks for any hints!
:Karsten.
\
| / | __ ) | Karsten.Hoffmann@mbs-software.de MBS-GmbH
| |/| | _ _ \ Phone : +49-2151-7294-38 Karsten Hoffmann
| | | | |) |__) | Fax : +49-2151-7294-50 Roemerstrasse 15
|| ||// Mobile: +49-172-3812373 D-47809 Krefeld