On 27/11/2017 16:08, Daniel P. Berrange wrote: > We should just do > > if (mode == QEMU_THREAD_DETACHED) { > pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); > } >
This is true, but Zhecheng's patch (when fixed---see patchew's report) would also fix a similar race on pthread_setname_np, so I think it's fine to introduce qemu_thread_start. Thanks, Paolo