Am 15.11.2021 um 15:53 schrieb Grant Edwards:
On 2021-11-15, Ajay Bhargav via lwip-users wrote:
sys_arch_protect() and sys_arch_unprotect() is always called in
pairs with call order maintained.
So the requirement stated in the documentation that
SYS_ARCH_UNPROTECT Perform a "fast" set of
On 2021-11-15, Ajay Bhargav via lwip-users wrote:
> No, I am not assuming mutext required to be nested either.
but I thought sys_arch_protect/unprotect are required to nest?
> Infact my implementation had only simple lock unlock only. And as
> far as I know, lwip do not use nesting of lock, as
No, I am not assuming mutext required to be nested either. Infact my
implementation had only simple lock unlock only. And as far as I know, lwip
do not use nesting of lock, as its obvious that not all system support
recursion.
And lev is usually common return value of isr flags when disable_irq or
On 2021-11-15, Ajay Bhargav via lwip-users wrote:
> protect/unprotect is totally implementation dependent with only
> intention of providing exclusive access to network related operation
> to be performed without any context switching. You can do this by
> using a mutext in simplest way
Are you
protect/unprotect is totally implementation dependent with only intention
of providing exclusive access to network related operation to be performed
without any context switching. You can do this by using a mutext in
simplest way but you have to make sure ISR do not do any operation either
when sys
On 2021-11-15, Ajay Bhargav via lwip-users wrote:
> sys_arch_protect() and sys_arch_unprotect() is always called in
> pairs with call order maintained.
So the requirement stated in the documentation that
SYS_ARCH_UNPROTECT Perform a "fast" set of the protection level to "lev".
is incorrect a
sys_arch_protect() and sys_arch_unprotect() is always called in pairs with
call order maintained. From rtos prospective, you can consider
sys_arch_protect() as enter_critical_section() and sys_arch_unprotect() as
exit_critical_section(). These calls might already be provided by rtos
you're using.
A couple questions about sys_arch_protect/unprotect
1. Are protect/unprotect calls required to nest?
2. Does the level passed to unprotect() have to do something?
I think I've found another instance where the original authors of my
sys_arch.c implemented something that meets the requirements