25 #include "dbus-dataslot.h"
26 #include "dbus-threads-internal.h"
82 else if (allocator->
lock_loc != mutex_loc)
84 _dbus_warn_check_failed (
"D-Bus threads were initialized after first using the D-Bus library. If your application does not directly initialize threads or use D-Bus, keep in mind that some library or plugin may have used D-Bus or initialized threads behind your back. You can often fix this problem by calling dbus_init_threads() or dbus_g_threads_init() early in your main() method, before D-Bus is used.\n");
105 while (slot < allocator->n_allocated_slots)
145 _dbus_verbose (
"Allocated slot %d on allocator %p total %d slots allocated %d used\n",
170 _dbus_assert (*slot_id_p < allocator->n_allocated_slots);
183 _dbus_verbose (
"Freeing slot %d on allocator %p total %d allocated %d used\n",
245 #ifndef DBUS_DISABLE_ASSERT
269 while (i < list->n_slots)
302 #ifndef DBUS_DISABLE_ASSERT
332 while (i < list->n_slots)
361 #ifdef DBUS_BUILD_TESTS
362 #include "dbus-test.h"
365 static int free_counter;
368 test_free_slot_data_func (
void *data)
380 _dbus_data_slot_test (
void)
423 test_free_slot_data_func,
424 &old_free_func, &old_data))
443 test_free_slot_data_func,
444 &old_free_func, &old_data))
447 _dbus_assert (old_free_func == test_free_slot_data_func);
450 (* old_free_func) (old_data);