mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
* Source/synchronization.m: Remove uneeded objc_sync_remove_node
function. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26894 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
78ea2c04a3
commit
71ec21f32f
2 changed files with 5 additions and 38 deletions
|
@ -157,44 +157,6 @@ objc_sync_add_node(id obj)
|
|||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the node for the object if one does exist.
|
||||
*/
|
||||
lock_node_t*
|
||||
objc_sync_remove_node(id obj)
|
||||
{
|
||||
lock_node_t *curr = NULL;
|
||||
|
||||
// find the node...
|
||||
curr = objc_sync_find_node(obj);
|
||||
|
||||
// if the node is not null, proceed...
|
||||
if (curr != NULL)
|
||||
{
|
||||
// skip the current node in
|
||||
// the list and remove it from the
|
||||
// prev and next nodes.
|
||||
lock_node_t *prev = NULL;
|
||||
lock_node_t *next = NULL;
|
||||
|
||||
prev = curr->prev;
|
||||
next = curr->next;
|
||||
|
||||
if (next != NULL)
|
||||
{
|
||||
next->prev = prev;
|
||||
}
|
||||
|
||||
if (prev != NULL)
|
||||
{
|
||||
prev->next = next;
|
||||
}
|
||||
}
|
||||
|
||||
// return the removed node...
|
||||
return curr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a lock for the object.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue