Re: NutEnterCriticalLevel

Uwe Bonnes <bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org> Mon, 15 Jan 2018 16:32:41 +0100
Newsgroups gmane.comp.hardware.microcontrollers.ethernut
Message-ID <[email protected]>
>>>>> "Dušan" == Dušan  <[email protected]> writes:

    Dušan> Hi Uwe, sounds like some smileys appear :-).

    Dušan> After reading your arguments I started to think - wow, why not to
    Dušan> have our life easier?

    Dušan> But the priority level is one thing, if we forget about it, then
    Dušan> we have the condition codes inside the status word.  And this
    Dušan> must be preserved during interrupt processing.  So the goal is
    Dušan> not to preserve priority level only, but to preserve condition
    Dušan> codes.  And if ccodes, then why not to preserve also priority
    Dušan> level :-).

What changes the condition code?
Your code implementing NutEnter/Exit Critical? Then change that code to not
touch the condition code.

Or the interrupt routine that may happen with your NutEnterCriticalLevel?
Then keep NutEnterCriticalLevel what it is: an arch-specific extension. Keep
it apart from the generic NutEnter|ExitCritical implementation. Then no
change in the generic nut/dev/ directory is needed.

Bye

-- 
Uwe Bonnes                bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion