| /* SPDX-License-Identifier: GPL-2.0 */ |
| #include <uapi/linux/kcov.h> |
| /* Coverage collection is not enabled yet. */ |
| /* KCOV was initialized, but tracing mode hasn't been chosen yet. */ |
| * Tracing coverage collection mode. |
| * Covered PCs are collected in a per-task buffer. |
| /* Collecting comparison operands mode. */ |
| #define KCOV_IN_CTXSW (1 << 30) |
| void kcov_task_init(struct task_struct *t); |
| void kcov_task_exit(struct task_struct *t); |
| #define kcov_prepare_switch(t) \ |
| (t)->kcov_mode |= KCOV_IN_CTXSW; \ |
| #define kcov_finish_switch(t) \ |
| (t)->kcov_mode &= ~KCOV_IN_CTXSW; \ |
| static inline void kcov_task_init(struct task_struct *t) {} |
| static inline void kcov_task_exit(struct task_struct *t) {} |
| static inline void kcov_prepare_switch(struct task_struct *t) {} |
| static inline void kcov_finish_switch(struct task_struct *t) {} |
| #endif /* _LINUX_KCOV_H */ |