Add a lock to io_end_interruptible, win32_maybe_interrupt_io