Hi Andreson!

The TaskletC (used by the RF230 driver and any other rfxlink radio
driver) does eliminate the recursion. It looks like recursion, but it
does the following:

1) from interrupt context (e.g. timer or radio) someone calles Tasklet.schedule
2) before the interrupt is returned to the main program (e.g. some
task that was interrupted) the TaskletC executes the scheduled work
3) if more Tasklet.schedule calles are made (either inside the doit or
another new interrupt) than those will not be executed immediately,
but queued up for execution
4) these queued execution requests are executed after 2) returns
5) this continuous until there are no more scheduled executions.

This code always limits to ONE execution of doit (step 2), and
prevents recursive and racy access to the radio driver components. It
is like a simple scheduler running on top of tasklet in interrupt
context. You can also disable this and use the built in task scheduler
by defining the TASKLET_IS_TASK macro.

Best,
Miklos

On Tue, Apr 10, 2012 at 9:48 AM, Anderson Nascimento
<[email protected]> wrote:
> Hello,
>
> I have been recently having some problems that I think may be caused by
> stack overflow. I found tos-ramsize (and stack-check make option) but came
> up with some errors.
>
> When testing apps/RadioCountToLeds with the iris platform, I get the
> following:
>
>> cannot estimate stack depth due to recursive loop of length 3:
>>   TaskletC__Tasklet__schedule @ 1862 -> TaskletC__doit @ f18
>>   TaskletC__doit @ f18 -> RF230DriverLayerP__Tasklet__schedule @ 1886
>>   RF230DriverLayerP__Tasklet__schedule @ 1886 ->
>> TaskletC__Tasklet__schedule @ 1862
>> tos-ramsize FAIL at /usr/bin/tos-ramsize line 1543.
>> make: [exe0] Error 255 (ignored)
>
>
> When testing apps/tests/storage/Config with the iris platform, I get the
> following:
>
>> cannot estimate stack depth due to recursive loop of length 2:
>>   At45dbP__handleRWRequest @ 187e -> At45dbP__syncOrFlushAll @ 1d06
>>   At45dbP__syncOrFlushAll @ 1d06 -> At45dbP__handleRWRequest @ 187e
>> tos-ramsize FAIL at /usr/bin/tos-ramsize line 1543.
>> make: [exe0] Error 255 (ignored)
>
>
> Is it possible to remove these recursive loops, or is it something that I
> just have to live with? Also, should I expect to see this error for any
> other driver or protocol modules?
>
> PS: I know that these are not the source of my problem, but I cannot run
> stack-check on my application if parts other than my application are failing
> stack-check.
>
> Thanks,
> --
> Anderson Nascimento
> Embedded Systems Engineer
> Spensa Technologies, Inc
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to