Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: list.c 7246 2007-01-29 18:49:05Z twisti $
+ $Id: list.c 7596 2007-03-28 21:05:53Z twisti $
*/
}
-/* list_add_list_unsynced ******************************************************
+/* list_add_last_unsynced ******************************************************
Adds the element as last element but does NO locking!
}
+/* list_remove ***************************************************************
+
+ Removes the element.
+
+*******************************************************************************/
+
void list_remove(list *l, void *element)
+{
+ LOCK_MONITOR_ENTER(l);
+
+ list_remove_unsynced(l, element);
+
+ LOCK_MONITOR_EXIT(l);
+}
+
+
+/* list_remove_unsynced ********************************************************
+
+ Removes the element but does NO locking!
+
+ ATTENTION: Use this function with care!!!
+
+*******************************************************************************/
+
+void list_remove_unsynced(list *l, void *element)
{
listnode *ln;
ln = (listnode *) (((u1 *) element) + l->nodeoffset);
- LOCK_MONITOR_ENTER(l);
-
if (ln->next)
ln->next->prev = ln->prev;
else
ln->next = NULL;
ln->prev = NULL;
-
- LOCK_MONITOR_EXIT(l);
}