On Wed, Sep 14, 2011 at 6:07 AM, Francisco Sant'anna <
francisco.santa...@gmail.com> wrote:

> Hello,
>
> I understand that not all events preempt tasks, e.g., the conventional
> Timers.
> However, I often need them to behave as interruptions, with the same
> semantics shown in the "Holistic paper".
>
> Questions:
> 1- to achieve the desired behavior I'd need to work in a much lower level,
> right?
>
the convenvional timers don't use interrups, you'd have to change that in a
lower level thats right.


> 2- do these synchronous events end up in the task queue?


if you trace down a call to startOneShot() or startPeriodic() you'll see
that there are things ending up in the queue.
That should not be a problem because TinyOS tasks are suposed to be short
and not suposed to keep the rest of the system (the synchronous code)
waiting for them to finish.

>


> I assumed that they do end up in the task queue.
> That said, I included in the file SchedulerBasicP.nc (and corresponding
> interface) the following command:
>
> command bool Scheduler.isEmpty ()
> {
>     return m_head == NO_TASK;
> }
>
> Hence, instead of continuously re-scheduling a heavy duty task, I first
> check if there is a pending task (e.g. Timer.fired).
> It seems to be working correctly, the sample application boosted 10x, but I
> am not 100% sure about my approach.
>
> What application are you using, and how did you get to notice that 10x?

João

Thanks for any feedback,
> Francisco
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to