Skip to content

Commit

Permalink
replay: don't destroy mutex at exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dovgalyuk authored and bonzini committed Mar 12, 2018
1 parent a36544d commit 1a42389
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
5 changes: 0 additions & 5 deletions replay/replay-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion replay/replay-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 0 additions & 1 deletion replay/replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ void replay_finish(void)
replay_snapshot = NULL;

replay_finish_events();
replay_mutex_destroy();
}

void replay_add_blocker(Error *reason)
Expand Down

0 comments on commit 1a42389

Please sign in to comment.