lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Question about sys_arch.c *_free() vs. *_~set_invalid()


From: Grant Edwards
Subject: Re: [lwip-users] Question about sys_arch.c *_free() vs. *_~set_invalid()
Date: Fri, 12 Nov 2021 22:31:22 -0000 (UTC)
User-agent: slrn/1.0.3 (Linux)

On 2021-11-12, goldsimon@gmx.de <goldsimon@gmx.de> wrote:
>
>> Are there ports where an object is still valid after sys_*_free() is
>> called? After a semphore has been free()ed, what operations on an
>> already free()ed object would still be valid?
>
> None.
>
> This is only a helper define to help defining sys_sem_free() to
> something that might not make sys_sem_valid() return true.

I'm afraid I don't understand your answer.

If sys_*_free() always leaves the sys_*_t instance in the "invalid"
state, what are the subsequent sys_*_set_invalid() calls for?

If no operations are valid after a call to free(), why would
sys_*_free() be allowed to leave the sys_*_t instance in a "valid"
state?

I'm going to work on submitting patches for the documentation of the
functions in sys_arch.c, but I still don't really understand the
purpose of the sys_*_set_invalid() functions. I've made mine do
something analgous to what the freeRTOS calls do, but I don't really
"get it".

Are they simply to force an uninitialized sys_*_t instances into an
"invalid" state until the first time they are passed to sys_*_new()?

--
Grant






reply via email to

[Prev in Thread] Current Thread [Next in Thread]