[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] FromISR port abstraction layer (was: Help with LwIP Mod
From: |
Freddie Chopin |
Subject: |
Re: [lwip-users] FromISR port abstraction layer (was: Help with LwIP Modem) |
Date: |
Mon, 11 Jul 2016 22:24:11 +0200 |
On pon, 2016-07-11 at 21:09 +0200, address@hidden 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
- Re: [lwip-users] Help with LwIP Modem, (continued)
- Re: [lwip-users] Help with LwIP Modem, Sylvain Rochet, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Simon Goldschmidt, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jeff Barlow, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/08
- Re: [lwip-users] Help with LwIP Modem, address@hidden, 2016/07/09
- Re: [lwip-users] Help with LwIP Modem, address@hidden, 2016/07/09
- Re: [lwip-users] Help with LwIP Modem, Jeff Barlow, 2016/07/09
- [lwip-users] FromISR port abstraction layer (was: Help with LwIP Modem), address@hidden, 2016/07/11
- Re: [lwip-users] FromISR port abstraction layer (was: Help with LwIP Modem),
Freddie Chopin <=
- Re: [lwip-users] Help with LwIP Modem, Jaime Fernandez Hoffiz, 2016/07/13
Re: [lwip-users] Help with LwIP Modem, Sergio R. Caprile, 2016/07/15