MemoryPermission.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. namespace Ryujinx.Memory
  3. {
  4. /// <summary>
  5. /// Memory access permission control.
  6. /// </summary>
  7. [Flags]
  8. public enum MemoryPermission
  9. {
  10. /// <summary>
  11. /// No access is allowed on the memory region.
  12. /// </summary>
  13. None = 0,
  14. /// <summary>
  15. /// Allow reads on the memory region.
  16. /// </summary>
  17. Read = 1 << 0,
  18. /// <summary>
  19. /// Allow writes on the memory region.
  20. /// </summary>
  21. Write = 1 << 1,
  22. /// <summary>
  23. /// Allow code execution on the memory region.
  24. /// </summary>
  25. Execute = 1 << 2,
  26. /// <summary>
  27. /// Allow reads and writes on the memory region.
  28. /// </summary>
  29. ReadAndWrite = Read | Write,
  30. /// <summary>
  31. /// Allow reads and code execution on the memory region.
  32. /// </summary>
  33. ReadAndExecute = Read | Execute,
  34. /// <summary>
  35. /// Allow reads, writes, and code execution on the memory region.
  36. /// </summary>
  37. ReadWriteExecute = Read | Write | Execute
  38. }
  39. }