From: Pavel Dovgalyuk Date: Tue, 27 Feb 2018 09:52:54 +0000 (+0300) Subject: replay: don't destroy mutex at exit X-Git-Tag: v2.12.0-rc0~16^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a423896fa4fc2ea49c64e7a493d88a8b251950d;p=thirdparty%2Fqemu.git replay: don't destroy mutex at exit Replay mutex is held by vCPU thread and destroy function is called from atexit of the main thread. Therefore we cannot destroy it safely. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini Message-Id: <20180227095254.1060.96971.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- diff --git a/replay/replay-internal.c b/replay/replay-internal.c index 7cdefeaa04e..fa7bba6dfdb 100644 --- a/replay/replay-internal.c +++ b/replay/replay-internal.c @@ -176,11 +176,6 @@ void replay_mutex_init(void) qemu_mutex_init(&lock); } -void replay_mutex_destroy(void) -{ - qemu_mutex_destroy(&lock); -} - bool replay_mutex_locked(void) { return replay_locked; diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 41eee66e9b3..d4037058e43 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -104,7 +104,6 @@ void replay_get_array_alloc(uint8_t **buf, size_t *size); * synchronisation between vCPU and main-loop threads. */ void replay_mutex_init(void); -void replay_mutex_destroy(void); bool replay_mutex_locked(void); /*! Checks error status of the file. */ diff --git a/replay/replay.c b/replay/replay.c index 9cddb6bfc9f..5d05ee04601 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -358,7 +358,6 @@ void replay_finish(void) replay_snapshot = NULL; replay_finish_events(); - replay_mutex_destroy(); } void replay_add_blocker(Error *reason)