33 static pthread_mutex_t
mutex = PTHREAD_MUTEX_INITIALIZER;
44 pthread_mutex_lock (&
mutex);
53 GList *
items = g_hash_table_lookup (
hooks, name);
54 items = g_list_prepend (items, item);
57 pthread_mutex_unlock (&
mutex);
62 pthread_mutex_lock (&
mutex);
67 GList *
items = g_hash_table_lookup (
hooks, name);
73 GList * next = node->next;
75 if (item->
func == func && (! user || item->
user == user))
77 items = g_list_delete_link (items, node);
87 g_hash_table_remove (
hooks, name);
90 pthread_mutex_unlock (&
mutex);
95 pthread_mutex_lock (&
mutex);
100 GList * node = g_hash_table_lookup (
hooks, name);
102 for (; node; node = node->next)
109 pthread_mutex_unlock (&
mutex);