Skip to content

Commit 2331d10

Browse files
alexanderwachtercarlescufi
authored andcommitted
include: sys: thread_stack add missing extern "C" on C++
Add C linkage for compiling with C++ Signed-off-by: Alexander Wachter <[email protected]>
1 parent 55df308 commit 2331d10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/sys/thread_stack.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include <arch/cpu.h>
1818
#include <sys/util.h>
1919

20+
#ifdef __cplusplus
21+
extern "C" {
22+
#endif
23+
2024
/* Using typedef deliberately here, this is quite intended to be an opaque
2125
* type.
2226
*
@@ -399,6 +403,12 @@ static inline char *Z_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
399403
{
400404
return (char *)sym + K_THREAD_STACK_RESERVED;
401405
}
406+
402407
#endif /* CONFIG_USERSPACE */
408+
409+
#ifdef __cplusplus
410+
}
411+
#endif
412+
403413
#endif /* _ASMLANGUAGE */
404414
#endif /* ZEPHYR_INCLUDE_SYS_THREAD_STACK_H */

0 commit comments

Comments
 (0)