sched/note: include-able from C++ files

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-04-11 14:39:49 +08:00 committed by Xiang Xiao
parent a90bdda1ae
commit 609e949ab0

View File

@ -439,6 +439,15 @@ struct note_filter_irq_s
* Public Function Prototypes
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Name: sched_note_*
*
@ -658,6 +667,11 @@ void sched_note_filter_irq(struct note_filter_irq_s *oldf,
#endif /* defined(__KERNEL__) || defined(CONFIG_BUILD_FLAT) */
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#else /* CONFIG_SCHED_INSTRUMENTATION */
# define SCHED_NOTE_STRING(buf)