lock.h 657 B

123456789101112131415161718
  1. // Copyright 2017 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <mutex>
  6. namespace HLE {
  7. /*
  8. * Synchronizes access to the internal HLE kernel structures, it is acquired when a guest
  9. * application thread performs a syscall. It should be acquired by any host threads that read or
  10. * modify the HLE kernel state. Note: Any operation that directly or indirectly reads from or writes
  11. * to the emulated memory is not protected by this mutex, and should be avoided in any threads other
  12. * than the CPU thread.
  13. */
  14. extern std::recursive_mutex g_hle_lock;
  15. } // namespace HLE