MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / device_call_main_thread_callbacks

Function device_call_main_thread_callbacks

src/devices.cpp:132–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130static DEVICE_VOID device_callbacks[MAX_DEVICE_ITEMS];
131
132void device_call_main_thread_callbacks(void)
133{
134 uae_sem_wait(&thread_sema);
135 DEVICE_VOID device_callbacks_tmp[MAX_DEVICE_ITEMS];
136 int device_callbacks_cnt_tmp = device_callbacks_cnt;
137 memcpy(device_callbacks_tmp, device_callbacks, sizeof(DEVICE_VOID) * device_callbacks_cnt);
138 device_callbacks_cnt = 0;
139 uae_sem_post(&thread_sema);
140 execute_device_items(device_callbacks_tmp, device_callbacks_cnt_tmp);
141}
142
143// queues function for execution from main thread if called from another thread
144void device_add_main_thread_callback(DEVICE_VOID p)

Callers 4

haltloop_doFunction · 0.85
newcpu.cppFile · 0.85
do_specialtiesFunction · 0.85
run_cpu_threadFunction · 0.85

Calls 1

execute_device_itemsFunction · 0.85

Tested by

no test coverage detected