home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_12
/
8n12083b
< prev
next >
Wrap
Text File
|
1990-08-29
|
481b
|
21 lines
/* observer.c - Observer task */
#include <synrtx.h>
task Observer(void) {
task_t self = task_self();
msg_t msg;
task_setHandler(0);
loop {
/* wait for an event ...
* ... I've seeing one! then, interrupt Update.Observe
*/
msg.srcTid = self;
msg.dstTid = task_idOf("Update");
msg.dstHid = 0; /* Observe = 0 */
msg.type = msg_type_SYNC;
task_interrupt(&msg);
}
}