Hi

As you know you can post tasks in order to run them
"when it's possible".

I'd like to know if there's any way to send to sleep a
task. Let's take a look at an example situation of
what I'm talking about.

Let's imagine a neighbor table, that you're going to
update (maybe refresh timestamp, or clear old
entries..). While checking the table you must keep the
data consistent, so you have at least 2 ways:
1. Keep the updating code inside an atomic block.
Doing this way you could even loose packets, because
interrupts are disabled and the transceiver can't
notify of an incoming packet.
2. Protect the same code for example with something
similar to semaphores. The code for getting it is
easy, and you can reduce the size of atomic blocks
(you should only use them when updating the semaphore
status).

The problem for the second option is that only works
if you can "send to sleep" the current task and give
the control to another one (at least for a short
period of time). Of course It's only possible if
tinyOS is a multitask OS..

So.. can this (or something similar) be done in
tinyOS?

regards :D


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to