Elizabeth Figura (@zfigura) commented about dlls/winebth.sys/winebth.c:
+ { + irp = CONTAINING_RECORD(entry, IRP, Tail.Overlay.ListEntry); + irp->IoStatus.Status = STATUS_DELETE_PENDING; + irp->IoStatus.Information = 0; + IoCompleteRequest(irp, IO_NO_INCREMENT); + } +} + +static DWORD CALLBACK bluetooth_event_loop_thread_proc( void *arg ) +{ + NTSTATUS status; + while (TRUE) + { + struct winebluetooth_event_loop_result result = {0}; + + status = winebluetooth_event_loop_run( watcher, &result ); This function is confusing. It's called "loop_run", "loop_once", and "loop", but its use here implies it's not supposed to do any looping, but rather retrieve an event. Why not call it "get_event"? And "winebluetooth_event_loop_result" can just be "winebluetooth_event".
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6621#note_85260