mutex.h 761 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. #include "core/hle/kernel/kernel.h"
  7. namespace Kernel {
  8. /**
  9. * Releases a mutex
  10. * @param handle Handle to mutex to release
  11. */
  12. ResultCode ReleaseMutex(Handle handle);
  13. /**
  14. * Creates a mutex
  15. * @param initial_locked Specifies if the mutex should be locked initially
  16. * @param name Optional name of mutex
  17. * @return Handle to newly created object
  18. */
  19. Handle CreateMutex(bool initial_locked, const std::string& name="Unknown");
  20. /**
  21. * Releases all the mutexes held by the specified thread
  22. * @param thread Thread that is holding the mutexes
  23. */
  24. void ReleaseThreadMutexes(Handle thread);
  25. } // namespace