chardev/char.c: Use qemu_co_sleep_ns if in coroutine