|
From: | Andrew Lentvorski |
Subject: | Re: [lwip-users] Allocating and deallocating an mbox in different threads |
Date: | Wed, 18 Apr 2007 05:56:51 -0700 |
User-agent: | Thunderbird 1.5.0.10 (Macintosh/20070221) |
Kieran Mansley wrote:
So if I understand correctly I think this is specific to the modifications that you've made? I can't see a functional problem with changing this as you suggest to post a message that would then result in the freeing of the mbox, but I haven't looked at it in detail. I think though that as it is specific to your modifications, it's not appropriate to make this change in the general code base.
It would be a problem for anyone who uses an mbox implementation in sys_arch.c which is not memory/pointer based. The issue is that the NULL is effectively a stealth shutdown message. It is *not* specific to the fact that I am using 2 threads, multiple mbox-types, etc.
Now, I'm certainly willing to concede that the set of people not using memory/pointer-based mbox's may consist of exactly *1* person. ;)
But using that NULL as a shutdown message definitely breaks the sys_arch.c abstractions that you folks spent so much time setting up.
However, if it's just not a concern, then that's cool, too. I'll just hack something in; it's probably easier for me anyhow. If I don't have to worry about feeding it back into the main codebase, then I can just create a quick hack rather than work out all the race conditions to create a clean patch.
-a
[Prev in Thread] | Current Thread | [Next in Thread] |