serenity.h 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <Kernel/API/POSIX/sys/types.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #define PURGE_ALL_VOLATILE 0x1
  12. #define PURGE_ALL_CLEAN_INODE 0x2
  13. enum {
  14. PERF_EVENT_SAMPLE = 1,
  15. PERF_EVENT_MALLOC = 2,
  16. PERF_EVENT_FREE = 4,
  17. PERF_EVENT_MMAP = 8,
  18. PERF_EVENT_MUNMAP = 16,
  19. PERF_EVENT_PROCESS_CREATE = 32,
  20. PERF_EVENT_PROCESS_EXEC = 64,
  21. PERF_EVENT_PROCESS_EXIT = 128,
  22. PERF_EVENT_THREAD_CREATE = 256,
  23. PERF_EVENT_THREAD_EXIT = 512,
  24. PERF_EVENT_CONTEXT_SWITCH = 1024,
  25. PERF_EVENT_KMALLOC = 2048,
  26. PERF_EVENT_KFREE = 4096,
  27. PERF_EVENT_PAGE_FAULT = 8192,
  28. PERF_EVENT_SYSCALL = 16384,
  29. PERF_EVENT_SIGNPOST = 32768,
  30. };
  31. #define PERF_EVENT_MASK_ALL (~0ull)
  32. #define THREAD_PRIORITY_MIN 1
  33. #define THREAD_PRIORITY_LOW 10
  34. #define THREAD_PRIORITY_NORMAL 30
  35. #define THREAD_PRIORITY_HIGH 50
  36. #define THREAD_PRIORITY_MAX 99
  37. #ifdef __cplusplus
  38. }
  39. #endif