Comment 7 for bug 1754038

Revision history for this message
Antoine (acalando) wrote :

The workaround I described above is actually not the good one, because of this check occurring just before:

    if (!all_cpu_threads_idle()) {
        return;
    }

The exit request setting must be done before, so my code looks like this:

    CPUState *cpu;
    CPU_FOREACH(cpu) {
        atomic_mb_set(&cpu->exit_request, 1);
    }

    if (!all_cpu_threads_idle()) {
        return;
    }

(version is v2.11.0-2122-g9fa673c-dirty)