On pon, 2016-07-11 at 21:09 +0200, [email protected] wrote:
> What I mean is personally, I don' think it's good design to expose
> the 
> ISR/non-ISR fact accross layers of the code that possibly have
> nothing 
> to do with that knowledge.
> 
> Keeping my private view aside, is there a requirement to add
> "fromISR" 
> code in the port layer?

In my opinion - no. I really have no idea why some RTOSes have this
stupid idea of having "normal" functions and special versions that can
be used in interrupts and/or critical zones. In the RTOS I'm writing ( 
http://distortos.org/ ) there's no such nonsense - for example you can
just call Semaphore::post() no matter if you are in normal thread or in
interrupt or inside critical zone and everything works perfectly (;
LwIP works perfectly too and I don't need this special "in ISR" bool
variable.

BTW - on ARM Cortex-M (probably on other chips too) you don't really
need any special variable. You can determine whether you are in a
thread or in in interrupt by examining IPSR core register (0 == thread,
!0 == interrupt).

Regards,
FCh

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to