Re: DS80C400 reentrant multi tasking function calls with Keil compiler
DevUpdate <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Organization | Cyanica |
| Message-ID | <[email protected]> |
Hi Kris,
Many thanks for the feedback. Following your suggestion, I get the
behaviour I expected/wanted.
Cheers.
Richard
Kris Ardis wrote:
>>Am I correct in thinking that the "reentrant" keyword allows a function
>>to use the reentrant stack which "allows recursive function calls and
>>for multiple processes to call a single function simultaneously" (quoted
>>text from current Dallas startup400.a51 file)? I have demonstrated,
>>that a reentrant function called recursively executes correctly.
>>
>>
>>
>
>This text in the startup is not correct and will be changed. I don't think
>the reentrant keyword will allow multiple processes to call a function
>simultaneously with our task scheduler.
>
>
>
>>void foo() reentrant
>>{
>> int counter;
>> counter = 0;
>> while(counter++ < MAX_COUNT)
>> {
>> // *** DO SOMETHING ***
>> }
>> // Tidy up after task
>>}
>>
>>
>>
>
>In addition to the methods suggested by Bob Heise, if your local variables
>are in 'data' space, then you should also be multi-process safe. I think
>you could do this in this example with...
>
>
>
>> data int counter;
>>
>>
>
>Kris
>
>
>
>
>
>
>
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini