]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
replay: don't destroy mutex at exit
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Tue, 27 Feb 2018 09:52:54 +0000 (12:52 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Mar 2018 16:09:50 +0000 (17:09 +0100)
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 <pavel.dovgaluk@ispras.ru>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180227095254.1060.96971.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
replay/replay-internal.c
replay/replay-internal.h
replay/replay.c

index 7cdefeaa04e9bec6eff27a3615af40bb2c7cb41e..fa7bba6dfdb48b21beb5de689a6f6163d818e76e 100644 (file)
@@ -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;
index 41eee66e9b358df2ee791b95ea490fb874e52535..d4037058e435bafddeea02ef5def7ee45cfe7059 100644 (file)
@@ -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. */
index 9cddb6bfc9f264c0fbabc4f3ced8577423306ea7..5d05ee0460101bd624598e1359f89182b89749b9 100644 (file)
@@ -358,7 +358,6 @@ void replay_finish(void)
     replay_snapshot = NULL;
 
     replay_finish_events();
-    replay_mutex_destroy();
 }
 
 void replay_add_blocker(Error *reason)