Skip to content

Commit 0cc9ad4

Browse files
Benjamin Gwincarlescufi
authored andcommitted
testsuite: Make ztress header C++ compatible
This allows ztress to be linked correctly from C++ based tests. Signed-off-by: Benjamin Gwin <[email protected]>
1 parent dc4889e commit 0cc9ad4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subsys/testsuite/ztest/include/ztress.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
#include <zephyr/sys/util.h>
1010
#include <zephyr/kernel.h>
1111

12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
1216
/** @internal Internal ID's to distinguish context type. */
1317
#define ZTRESS_ID_THREAD 0
1418
#define ZTRESS_ID_K_TIMER 1
@@ -229,4 +233,8 @@ int ztress_preempt_count(uint32_t id);
229233
*/
230234
uint32_t ztress_optimized_ticks(uint32_t id);
231235

236+
#ifdef __cplusplus
237+
}
238+
#endif
239+
232240
#endif /* TESTSUITE_ZTEST_INCLUDE_ZTRESS_H__ */

0 commit comments

Comments
 (0)