coroutine-lock: Store the coroutine in the CoWaitRecord only once
commit2f6ef0393b54383c204d4d6aa5b8eec2bcad566f
authorDavid Edmondson <david.edmondson@oracle.com>
Thu, 25 Mar 2021 11:29:38 +0000 (25 12:29 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 31 Mar 2021 09:44:21 +0000 (31 10:44 +0100)
tree8460e490dd0f9bb4368c273eb02bd2f7d8ebe6c0
parent07ee2ab4fd0147edb64ba88e55407dd9d6656175
coroutine-lock: Store the coroutine in the CoWaitRecord only once

When taking the slow path for mutex acquisition, set the coroutine
value in the CoWaitRecord in push_waiter(), rather than both there and
in the caller.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210325112941.365238-4-pbonzini@redhat.com
Message-Id: <20210309144015.557477-4-david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/qemu-coroutine-lock.c