mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
include/exec: Add WITH_MMAP_LOCK_GUARD
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
736a1588c1
commit
990ef9182b
3 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,7 @@ void mmap_lock(void)
|
|||
|
||||
void mmap_unlock(void)
|
||||
{
|
||||
assert(mmap_lock_count > 0);
|
||||
if (--mmap_lock_count == 0) {
|
||||
pthread_mutex_unlock(&mmap_mutex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue