select() / WaitForMultipleObjects() -type functionality?
Jason Hinze
jjh at cosmicflow.com
Sun Apr 27 15:47:49 UTC 2003
Hello,
My apologies in advance if this is a boneheaded question with an
obvious answer, but I've perused the RTEMS documentation fairly
thoroughly and have been unable to find any facility that allows a task
to wait on one of any number of stimuli.
What I'm looking for is something like select() in the Unix/POSIX world
or WaitForMultipleObjects() in the WIN32 world.
Specifically, I'd like to be able to have a task wait for a message to
be received on any of a number of message queues. If a message arrives
on any one of the queues, RTEMS would wake the task and deliver the
message.
Of course, I could get this behavior through some combination of
polling and timers or having message senders explicitly wake receivers,
but I'm trying to use the OS to abstract this overhead and/or machinery
out of my application.
To give an idea of what I'm looking for, the facility might look
something like this:
rtems_status_code rtems_message_queues_receive(
struct rtems_mq_rcv_desc *mq_rcv_desc_array,
rtems_unsigned32 num_mq_rcv_desc,
rtems_unsigned32 *index_of_mq_which_received_msg,
rtems_unsigned32 *size,
rtems_unsigned32 option_set,
rtems_unsigned32 timeout
);
struct rtems_mq_rcv_desc {
rtems_id id,
void *buffer
}
So, does something like this exist? If not, is such a facility
implementable within the constraints of the internal architecture of
RTEMS (which I know very little about)? If it is implementable, is
this something an RTEMS newbie could successfully tackle (given a few
pointers, of course)?
Any information or guidance would be most appreciated.
Thanks,
Jason Hinze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1759 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20030427/6c05cdf0/attachment.bin>
More information about the users
mailing list