runtime_instr.h 634 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _RUNTIME_INSTR_H
  3. #define _RUNTIME_INSTR_H
  4. #include <uapi/asm/runtime_instr.h>
  5. extern struct runtime_instr_cb runtime_instr_empty_cb;
  6. static inline void save_ri_cb(struct runtime_instr_cb *cb_prev)
  7. {
  8. if (cb_prev)
  9. store_runtime_instr_cb(cb_prev);
  10. }
  11. static inline void restore_ri_cb(struct runtime_instr_cb *cb_next,
  12. struct runtime_instr_cb *cb_prev)
  13. {
  14. if (cb_next)
  15. load_runtime_instr_cb(cb_next);
  16. else if (cb_prev)
  17. load_runtime_instr_cb(&runtime_instr_empty_cb);
  18. }
  19. struct task_struct;
  20. void runtime_instr_release(struct task_struct *tsk);
  21. #endif /* _RUNTIME_INSTR_H */