#include <rtx51tny.h>
unsigned char counter0;
unsigned char counter1;
void job0 (void) _task_ 0
{
os_create_task(1); // mark task 1 as ready
while (1) // loop forever
{
if (++counter0==0) // update the counter
{
os_send_signal(1); /* signal task 1 */
}
}
}
void job1 (void) _task_ 1
{
while (1) /* loop forever */
{
os_wait1(K_SIG); /* wait for a signal */
counter1++; /* update the counter */
}
}