On 25/05/2016 13:07, Alex Bennée wrote: >>>> + * If called from generated code, iothread mutex must not be held. >>> >>> What does that mean? If iothread mutex is not required by the function >>> then why mention it here at all? >> >> If this function can take the iothread mutex itself, this would cause a >> deadlock. I'm not sure if it could though. >> >> Another possibility is that this function can longjmp out into cpu_exec, >> and then the iothread mutex would not be released. I think this is more >> likely. > > Any longjmp should: > > tb_lock_reset(); > if (qemu_mutex_iothread_locked()) { > qemu_mutex_unlock_iothread(); > } > > To reset the locks. >
Ok, so I think these comments are stale, dating to before you added the unlock_iothread in the sigsetjmp else. Thanks, Paolo