mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Thread safety fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3532b5295
commit
bdf6b69bce
3 changed files with 62 additions and 15 deletions
|
@ -1574,14 +1574,14 @@ typedef struct {
|
|||
unsigned i;
|
||||
|
||||
M_LOCK(messagePortLock);
|
||||
NSMapRemove(messagePortMap, (void*)name);
|
||||
M_UNLOCK(messagePortLock);
|
||||
if (lDesc >= 0)
|
||||
{
|
||||
(void) close(lDesc);
|
||||
unlink([name bytes]);
|
||||
lDesc = -1;
|
||||
}
|
||||
NSMapRemove(messagePortMap, (void*)name);
|
||||
M_UNLOCK(messagePortLock);
|
||||
|
||||
if (handles != 0)
|
||||
{
|
||||
|
@ -1691,6 +1691,21 @@ typedef struct {
|
|||
}
|
||||
}
|
||||
|
||||
- (void) release
|
||||
{
|
||||
M_LOCK(messagePortLock);
|
||||
if (NSDecrementExtraRefCountWasZero(self))
|
||||
{
|
||||
NSMapRemove(messagePortMap, (void*)name);
|
||||
M_UNLOCK(messagePortLock);
|
||||
[self dealloc];
|
||||
}
|
||||
else
|
||||
{
|
||||
M_UNLOCK(messagePortLock);
|
||||
}
|
||||
}
|
||||
|
||||
- (void) removeHandle: (GSMessageHandle*)handle
|
||||
{
|
||||
M_LOCK(myLock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue