testsuite: Make ztress header C++ compatible

This allows ztress to be linked correctly from C++ based tests.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
This commit is contained in:
Benjamin Gwin 2022-06-03 15:02:58 -07:00 committed by Carles Cufí
commit 0cc9ad4f50

View file

@ -9,6 +9,10 @@
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @internal Internal ID's to distinguish context type. */ /** @internal Internal ID's to distinguish context type. */
#define ZTRESS_ID_THREAD 0 #define ZTRESS_ID_THREAD 0
#define ZTRESS_ID_K_TIMER 1 #define ZTRESS_ID_K_TIMER 1
@ -229,4 +233,8 @@ int ztress_preempt_count(uint32_t id);
*/ */
uint32_t ztress_optimized_ticks(uint32_t id); uint32_t ztress_optimized_ticks(uint32_t id);
#ifdef __cplusplus
}
#endif
#endif /* TESTSUITE_ZTEST_INCLUDE_ZTRESS_H__ */ #endif /* TESTSUITE_ZTEST_INCLUDE_ZTRESS_H__ */