[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Do functions like sys_mbox_invalid() need to be thread
From: |
Grant Edwards |
Subject: |
Re: [lwip-users] Do functions like sys_mbox_invalid() need to be thread safe? |
Date: |
Wed, 10 Nov 2021 21:34:19 -0000 (UTC) |
User-agent: |
slrn/1.0.3 (Linux) |
On 2021-11-10, goldsimon@gmx.de <goldsimon@gmx.de> wrote:
>
>> I mean can two invocations of the sys_* (mailbox, mutex or semaphore)
>> functions happen "at the same time". For example: can the execution
>> of one call to sys_{sem,mutex,mbox}_set_invalid() be interrupted or
>> suspended by another call to that same function? [The second
>> invocation would be for a different object obviously.] After the second
>> invocation finished, the first one would then resume.
>
> Yes, ok, that can of course happen.
I thought so. The original authors of the port clearly did not, even
though they seemed aware of the possiblity of some other functions
being called re-entrantly.
> There's no restriction between calling those functions on different
> objects.
OK, thanks — I've definitely got race conditions I need to fix. :)
> The only guarantee you get with lwIP is probably that allocation and
> deallocation points are safe...
I don't quite understand: what does "points are safe" mean?
Thanks again,
--
Grant