Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _RUNTIME_INSTR_H
0003 #define _RUNTIME_INSTR_H
0004 
0005 #include <uapi/asm/runtime_instr.h>
0006 
0007 extern struct runtime_instr_cb runtime_instr_empty_cb;
0008 
0009 static inline void save_ri_cb(struct runtime_instr_cb *cb_prev)
0010 {
0011     if (cb_prev)
0012         store_runtime_instr_cb(cb_prev);
0013 }
0014 
0015 static inline void restore_ri_cb(struct runtime_instr_cb *cb_next,
0016                  struct runtime_instr_cb *cb_prev)
0017 {
0018     if (cb_next)
0019         load_runtime_instr_cb(cb_next);
0020     else if (cb_prev)
0021         load_runtime_instr_cb(&runtime_instr_empty_cb);
0022 }
0023 
0024 struct task_struct;
0025 
0026 void runtime_instr_release(struct task_struct *tsk);
0027 
0028 #endif /* _RUNTIME_INSTR_H */