Lines Matching refs:watches

62   DBusHashTable *watches;  member
108 DBusList **watches = data; in free_watch_table_entry() local
113 if (watches == NULL) in free_watch_table_entry()
116 for (watch = _dbus_list_pop_first (watches); in free_watch_table_entry()
118 watch = _dbus_list_pop_first (watches)) in free_watch_table_entry()
123 _dbus_assert (*watches == NULL); in free_watch_table_entry()
124 dbus_free (watches); in free_watch_table_entry()
136 loop->watches = _dbus_hash_table_new (DBUS_HASH_INT, NULL, in _dbus_loop_new()
141 if (loop->watches == NULL || loop->socket_set == NULL) in _dbus_loop_new()
143 if (loop->watches != NULL) in _dbus_loop_new()
144 _dbus_hash_table_unref (loop->watches); in _dbus_loop_new()
185 _dbus_hash_table_unref (loop->watches); in _dbus_loop_unref()
195 DBusList **watches; in ensure_watch_table_entry() local
197 watches = _dbus_hash_table_lookup_int (loop->watches, fd); in ensure_watch_table_entry()
199 if (watches == NULL) in ensure_watch_table_entry()
201 watches = dbus_new0 (DBusList *, 1); in ensure_watch_table_entry()
203 if (watches == NULL) in ensure_watch_table_entry()
204 return watches; in ensure_watch_table_entry()
206 if (!_dbus_hash_table_insert_int (loop->watches, fd, watches)) in ensure_watch_table_entry()
208 dbus_free (watches); in ensure_watch_table_entry()
209 watches = NULL; in ensure_watch_table_entry()
213 return watches; in ensure_watch_table_entry()
221 DBusList **watches; in cull_watches_for_invalid_fd() local
224 watches = _dbus_hash_table_lookup_int (loop->watches, fd); in cull_watches_for_invalid_fd()
226 if (watches != NULL) in cull_watches_for_invalid_fd()
228 for (link = _dbus_list_get_first_link (watches); in cull_watches_for_invalid_fd()
230 link = _dbus_list_get_next_link (watches, link)) in cull_watches_for_invalid_fd()
234 _dbus_hash_table_remove_int (loop->watches, fd); in cull_watches_for_invalid_fd()
239 DBusList **watches, in gc_watch_table_entry() argument
243 if (watches == NULL) in gc_watch_table_entry()
247 if (*watches != NULL) in gc_watch_table_entry()
250 _dbus_hash_table_remove_int (loop->watches, fd); in gc_watch_table_entry()
256 DBusList **watches, in refresh_watches_for_fd() argument
265 if (watches == NULL) in refresh_watches_for_fd()
266 watches = _dbus_hash_table_lookup_int (loop->watches, fd); in refresh_watches_for_fd()
270 _dbus_assert (watches != NULL); in refresh_watches_for_fd()
272 for (link = _dbus_list_get_first_link (watches); in refresh_watches_for_fd()
274 link = _dbus_list_get_next_link (watches, link)) in refresh_watches_for_fd()
295 DBusList **watches; in _dbus_loop_add_watch() local
300 watches = ensure_watch_table_entry (loop, fd); in _dbus_loop_add_watch()
302 if (watches == NULL) in _dbus_loop_add_watch()
305 if (!_dbus_list_append (watches, _dbus_watch_ref (watch))) in _dbus_loop_add_watch()
308 gc_watch_table_entry (loop, watches, fd); in _dbus_loop_add_watch()
313 if (_dbus_list_length_is_one (watches)) in _dbus_loop_add_watch()
319 _dbus_hash_table_remove_int (loop->watches, fd); in _dbus_loop_add_watch()
326 refresh_watches_for_fd (loop, watches, fd); in _dbus_loop_add_watch()
345 DBusList **watches; in _dbus_loop_remove_watch() local
355 watches = _dbus_hash_table_lookup_int (loop->watches, fd); in _dbus_loop_remove_watch()
357 if (watches != NULL) in _dbus_loop_remove_watch()
359 link = _dbus_list_get_first_link (watches); in _dbus_loop_remove_watch()
362 DBusList *next = _dbus_list_get_next_link (watches, link); in _dbus_loop_remove_watch()
367 _dbus_list_remove_link (watches, link); in _dbus_loop_remove_watch()
374 if (gc_watch_table_entry (loop, watches, fd)) in _dbus_loop_remove_watch()
612 if (_dbus_hash_table_get_n_entries (loop->watches) == 0 && in _dbus_loop_iterate()
691 _dbus_hash_iter_init (loop->watches, &hash_iter); in _dbus_loop_iterate()
695 DBusList **watches; in _dbus_loop_iterate() local
701 watches = _dbus_hash_iter_get_value (&hash_iter); in _dbus_loop_iterate()
703 for (link = _dbus_list_get_first_link (watches); in _dbus_loop_iterate()
705 link = _dbus_list_get_next_link (watches, link)) in _dbus_loop_iterate()
717 refresh_watches_for_fd (loop, watches, fd); in _dbus_loop_iterate()
790 DBusList **watches; in _dbus_loop_iterate() local
822 watches = _dbus_hash_table_lookup_int (loop->watches, in _dbus_loop_iterate()
825 if (watches == NULL) in _dbus_loop_iterate()
830 for (link = _dbus_list_get_first_link (watches); in _dbus_loop_iterate()
836 next = _dbus_list_get_next_link (watches, link); in _dbus_loop_iterate()
871 refresh_watches_for_fd (loop, watches, ready_fds[i].fd); in _dbus_loop_iterate()