compiler-context-analysis.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _TOOLS_LINUX_COMPILER_CONTEXT_ANALYSIS_H
  3. #define _TOOLS_LINUX_COMPILER_CONTEXT_ANALYSIS_H
  4. /*
  5. * Macros and attributes for compiler-based static context analysis.
  6. * No-op stubs for tools.
  7. */
  8. #define __guarded_by(...)
  9. #define __pt_guarded_by(...)
  10. #define context_lock_struct(name, ...) struct __VA_ARGS__ name
  11. #define __no_context_analysis
  12. #define __context_unsafe(comment)
  13. #define context_unsafe(...) ({ __VA_ARGS__; })
  14. #define context_unsafe_alias(p)
  15. #define disable_context_analysis()
  16. #define enable_context_analysis()
  17. #define __must_hold(...)
  18. #define __must_not_hold(...)
  19. #define __acquires(...)
  20. #define __cond_acquires(ret, x)
  21. #define __releases(...)
  22. #define __acquire(x) (void)0
  23. #define __release(x) (void)0
  24. #define __must_hold_shared(...)
  25. #define __acquires_shared(...)
  26. #define __cond_acquires_shared(ret, x)
  27. #define __releases_shared(...)
  28. #define __acquire_shared(x) (void)0
  29. #define __release_shared(x) (void)0
  30. #define __acquire_ret(call, expr) (call)
  31. #define __acquire_shared_ret(call, expr) (call)
  32. #define __acquires_ret
  33. #define __acquires_shared_ret
  34. #endif /* _TOOLS_LINUX_COMPILER_CONTEXT_ANALYSIS_H */