Commit 53fb28d1 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging



Pull request

v2:
 * v1 emails 2/3 and 3/3 weren't sent due to an email failure
 * Included Sergio's updated wording in the commit description

# gpg: Signature made Wed 08 Nov 2017 19:12:01 GMT
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  util/async: use atomic_mb_set in qemu_bh_cancel
  tests-aio-multithread: fix /aio/multi/schedule race condition

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 4ffa88c9 ef6dada8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -144,17 +144,16 @@ static void finish_cb(void *opaque)
static coroutine_fn void test_multi_co_schedule_entry(void *opaque)
{
    g_assert(to_schedule[id] == NULL);
    atomic_mb_set(&to_schedule[id], qemu_coroutine_self());

    while (!atomic_mb_read(&now_stopping)) {
        int n;

        n = g_test_rand_int_range(0, NUM_CONTEXTS);
        schedule_next(n);
        qemu_coroutine_yield();

        g_assert(to_schedule[id] == NULL);
        atomic_mb_set(&to_schedule[id], qemu_coroutine_self());
        qemu_coroutine_yield();
        g_assert(to_schedule[id] == NULL);
    }
}

+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ void qemu_bh_schedule(QEMUBH *bh)
 */
void qemu_bh_cancel(QEMUBH *bh)
{
    bh->scheduled = 0;
    atomic_mb_set(&bh->scheduled, 0);
}

/* This func is async.The bottom half will do the delete action at the finial