Keil™, An ARM® Company

Discussion Forum

RTX and events?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
mare mare
Posted
25-Aug-2006 07:55
Toolset
None
New! RTX and events?

Hello! I have question about os_evt_wait_or() and os_evt_wait_and(). I was reading about theoretical differents between this functions, but in practice doesn't work like i thought.

Can you give me a simple example how to use os_evt_wait_and()?

Thanks

Read-Only
Author
Robert McNamara
Posted
25-Aug-2006 08:28
Toolset
None
New! RE: RTX and events?

os_evt_wait with AND FALSE waits for all the "events" to be set before it will return.

os_evt_wait( 0x05, timeout, TRUE );
or use the MACRO os_evt_wait_and(0x05, timeout);

the program will wait until some task(s) calls

os_set_evt( 0x01, waitingTasksTID); AND
os_set_evt( 0x04, waitingTasksTID);

os_evt_wait with AND FALSE waits for any "event" to be set to return

os_evt_wait( 0x05, timeout, FALSE);
os use MACRO os_evt_wait_or( 0x05, timeout);

the program will wait until some task calls

os_set_evt( 0x01, waitingTasksTID); OR
os_set_evt( 0x04, waitingTasksTId);

It will not wait for both to be called.

Read-Only
Author
mare mare
Posted
28-Aug-2006 02:19
Toolset
None
New! RE: RTX and events?

Thanks

Next Thread | Thread List | Previous Thread Start a Thread | Settings