Skip to content

Commit 4cae9b8

Browse files
ZzzwierzakMaureenHelm
authored andcommitted
kernel: Add extern "C" to kernel_struct.h
Add extern "C" to kernel_struct.h to allow linkage in cpp. Signed-off-by: Marcin Zwierz <[email protected]>
1 parent 5a40709 commit 4cae9b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/kernel_structs.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
#include <arch/structs.h>
3131
#endif
3232

33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
3337
#define K_NUM_PRIORITIES \
3438
(CONFIG_NUM_COOP_PRIORITIES + CONFIG_NUM_PREEMPT_PRIORITIES + 1)
3539

@@ -230,6 +234,10 @@ struct _timeout {
230234
#endif
231235
};
232236

237+
#ifdef __cplusplus
238+
}
239+
#endif
240+
233241
#endif /* _ASMLANGUAGE */
234242

235243
#endif /* ZEPHYR_KERNEL_INCLUDE_KERNEL_STRUCTS_H_ */

0 commit comments

Comments
 (0)