From 369e9b30e25807f01fb69baa52dd64d7d98c286f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 11:49:41 +0100 Subject: [PATCH 01/11] core: move scheduler defines to sched.h --- core/include/kernel_types.h | 53 ------------------------------------- core/include/sched.h | 45 ++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 54 deletions(-) diff --git a/core/include/kernel_types.h b/core/include/kernel_types.h index 858035314dcb..f99f3434334c 100644 --- a/core/include/kernel_types.h +++ b/core/include/kernel_types.h @@ -45,58 +45,5 @@ typedef signed ssize_t; # endif #endif -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @def MAXTHREADS - * @brief The maximum number of threads to be scheduled - */ -#ifndef MAXTHREADS -#define MAXTHREADS 32 -#endif - -/** - * Canonical identifier for an invalid PID. - */ -#define KERNEL_PID_UNDEF 0 - -/** - * The first valid PID (inclusive). - */ -#define KERNEL_PID_FIRST (KERNEL_PID_UNDEF + 1) - -/** - * The last valid PID (inclusive). - */ -#define KERNEL_PID_LAST (KERNEL_PID_FIRST + MAXTHREADS - 1) - -/** - * Macro for printing formatter - */ -#define PRIkernel_pid PRIi16 - -/** - * Unique process identifier - */ -typedef int16_t kernel_pid_t; - -/** - * @brief Determine if the given pid is valid - * - * @param[in] pid The pid to check - * - * @return true if the pid is valid, false otherwise - */ -static inline int pid_is_valid(kernel_pid_t pid) -{ - return ((KERNEL_PID_FIRST <= pid) && (pid <= KERNEL_PID_LAST)); -} - -#ifdef __cplusplus -} -#endif - #endif /* KERNEL_TYPES_H */ /** @} */ diff --git a/core/include/sched.h b/core/include/sched.h index 214d7af32762..d0a4704f86eb 100644 --- a/core/include/sched.h +++ b/core/include/sched.h @@ -82,7 +82,6 @@ #include #include "kernel_defines.h" -#include "kernel_types.h" #include "native_sched.h" #include "clist.h" @@ -90,6 +89,50 @@ extern "C" { #endif +/** + * @def MAXTHREADS + * @brief The maximum number of threads to be scheduled + */ +#ifndef MAXTHREADS +#define MAXTHREADS 32 +#endif + +/** + * Canonical identifier for an invalid PID. + */ +#define KERNEL_PID_UNDEF 0 + +/** + * The first valid PID (inclusive). + */ +#define KERNEL_PID_FIRST (KERNEL_PID_UNDEF + 1) + +/** + * The last valid PID (inclusive). + */ +#define KERNEL_PID_LAST (KERNEL_PID_FIRST + MAXTHREADS - 1) + +/** + * Macro for printing formatter + */ +#define PRIkernel_pid PRIi16 + +/** + * Unique process identifier + */ +typedef int16_t kernel_pid_t; + +/** + * @brief Determine if the given pid is valid + * + * @param[in] pid The pid to check + * + * @return true if the pid is valid, false otherwise + */ +static inline int pid_is_valid(kernel_pid_t pid) +{ + return ((KERNEL_PID_FIRST <= pid) && (pid <= KERNEL_PID_LAST)); +} /** * @brief forward declaration for thread_t, defined in thread.h */ From 1ca0c2317340957c9686fbdf02d7c327b90206c3 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 11:50:22 +0100 Subject: [PATCH 02/11] core/msg: adapt to changed thread define location --- core/include/msg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/include/msg.h b/core/include/msg.h index 5b598470a790..7ce01161a26f 100644 --- a/core/include/msg.h +++ b/core/include/msg.h @@ -167,7 +167,8 @@ #include #include -#include "kernel_types.h" + +#include "sched.h" #ifdef __cplusplus extern "C" { From 3a643246c8171937a452db73d249412972ad2a7a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 11:50:38 +0100 Subject: [PATCH 03/11] sys/vfs: adapt to changed thread define location --- sys/include/vfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/vfs.h b/sys/include/vfs.h index e0a96b003687..1c44cd75cd2c 100644 --- a/sys/include/vfs.h +++ b/sys/include/vfs.h @@ -66,7 +66,7 @@ #include /* for off_t etc. */ #include /* for struct statvfs */ -#include "kernel_types.h" +#include "sched.h" #include "clist.h" #ifdef __cplusplus From 7fa8b69912be7dc2e4048d776ca33e5998eb2221 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 12:21:19 +0100 Subject: [PATCH 04/11] core: include inttypes.h in sched.h sched.h now defines PRIkernel_pid to PRIi16, which in turn is defined in inttypes.h. --- core/include/sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/include/sched.h b/core/include/sched.h index d0a4704f86eb..ceea4771bafa 100644 --- a/core/include/sched.h +++ b/core/include/sched.h @@ -81,6 +81,8 @@ #define SCHED_H #include +#include + #include "kernel_defines.h" #include "native_sched.h" #include "clist.h" From 0b801c4de0e02bd17cb5b66e878a82f32fa8a7b1 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 13:56:48 +0100 Subject: [PATCH 05/11] all: adapt to moved sched defines --- core/include/rmutex.h | 2 +- drivers/include/pir.h | 2 +- pkg/lwip/include/arch/sys_arch.h | 2 +- pkg/uwb-core/include/dpl/dpl_tasks.h | 2 +- sys/include/can/device.h | 2 +- sys/include/can/raw.h | 2 +- sys/include/net/fib.h | 2 +- sys/include/net/fib/table.h | 2 +- sys/include/net/gnrc/ipv6.h | 2 +- sys/include/net/gnrc/netif.h | 2 +- sys/include/net/gnrc/netreg.h | 2 +- sys/include/net/gnrc/pkt.h | 2 +- sys/include/net/gnrc/pktdump.h | 2 +- sys/include/net/gnrc/sixlowpan.h | 2 +- sys/include/net/gnrc/sixlowpan/frag/fb.h | 2 +- sys/include/usb/usbus.h | 2 +- sys/include/xtimer.h | 2 +- sys/include/ztimer.h | 2 +- sys/include/ztimer/xtimer_compat.h | 2 +- sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c | 2 +- sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h | 2 +- sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c | 2 +- sys/ps/ps.c | 2 +- sys/shell/commands/sc_gnrc_icmpv6_echo.c | 2 +- sys/vfs/vfs.c | 2 +- tests/bench_sizeof_coretypes/main.c | 2 +- tests/thread_flood/main.c | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/include/rmutex.h b/core/include/rmutex.h index 67f664f5499b..3fc6585782ef 100644 --- a/core/include/rmutex.h +++ b/core/include/rmutex.h @@ -31,7 +31,7 @@ #endif #include "mutex.h" -#include "kernel_types.h" +#include "sched.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/include/pir.h b/drivers/include/pir.h index 7e2343112f75..b46989c1af7f 100644 --- a/drivers/include/pir.h +++ b/drivers/include/pir.h @@ -22,7 +22,7 @@ #ifndef PIR_H #define PIR_H -#include "kernel_types.h" +#include "sched.h" #include "periph/gpio.h" #include "stdbool.h" diff --git a/pkg/lwip/include/arch/sys_arch.h b/pkg/lwip/include/arch/sys_arch.h index 7ac430a30b49..d90b8e7b1a3b 100644 --- a/pkg/lwip/include/arch/sys_arch.h +++ b/pkg/lwip/include/arch/sys_arch.h @@ -25,7 +25,7 @@ #include #include "cib.h" -#include "kernel_types.h" +#include "sched.h" #include "mbox.h" #include "mutex.h" #include "random.h" diff --git a/pkg/uwb-core/include/dpl/dpl_tasks.h b/pkg/uwb-core/include/dpl/dpl_tasks.h index 29591396b2ff..62b2139aaf4f 100644 --- a/pkg/uwb-core/include/dpl/dpl_tasks.h +++ b/pkg/uwb-core/include/dpl/dpl_tasks.h @@ -22,7 +22,7 @@ #include "dpl_types.h" -#include "kernel_types.h" +#include "sched.h" #include "thread.h" #ifdef __cplusplus diff --git a/sys/include/can/device.h b/sys/include/can/device.h index 7a484ae03f32..f0dbaa041e5d 100644 --- a/sys/include/can/device.h +++ b/sys/include/can/device.h @@ -25,7 +25,7 @@ extern "C" { #endif #include "can/candev.h" -#include "kernel_types.h" +#include "sched.h" #ifdef MODULE_CAN_PM #include "xtimer.h" diff --git a/sys/include/can/raw.h b/sys/include/can/raw.h index 27aa88133877..49a704048831 100644 --- a/sys/include/can/raw.h +++ b/sys/include/can/raw.h @@ -28,7 +28,7 @@ extern "C" { #endif -#include "kernel_types.h" +#include "sched.h" #include "can/can.h" #include "can/common.h" #include "can/device.h" diff --git a/sys/include/net/fib.h b/sys/include/net/fib.h index ef33af7fbc70..6e73cb39eba9 100644 --- a/sys/include/net/fib.h +++ b/sys/include/net/fib.h @@ -28,7 +28,7 @@ #include #include "net/fib/table.h" -#include "kernel_types.h" +#include "sched.h" #ifdef __cplusplus extern "C" { diff --git a/sys/include/net/fib/table.h b/sys/include/net/fib/table.h index d6e7e7704b51..9cbe50dbe031 100644 --- a/sys/include/net/fib/table.h +++ b/sys/include/net/fib/table.h @@ -21,7 +21,7 @@ #include -#include "kernel_types.h" +#include "sched.h" #include "universal_address.h" #include "mutex.h" diff --git a/sys/include/net/gnrc/ipv6.h b/sys/include/net/gnrc/ipv6.h index e230824a03a1..65dc661b701f 100644 --- a/sys/include/net/gnrc/ipv6.h +++ b/sys/include/net/gnrc/ipv6.h @@ -99,7 +99,7 @@ #ifndef NET_GNRC_IPV6_H #define NET_GNRC_IPV6_H -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc.h" #include "thread.h" diff --git a/sys/include/net/gnrc/netif.h b/sys/include/net/gnrc/netif.h index 62aa4e7c2d0a..aa79a6597db1 100644 --- a/sys/include/net/gnrc/netif.h +++ b/sys/include/net/gnrc/netif.h @@ -33,7 +33,7 @@ #include #include -#include "kernel_types.h" +#include "sched.h" #include "msg.h" #ifdef MODULE_GNRC_NETIF_BUS #include "msg_bus.h" diff --git a/sys/include/net/gnrc/netreg.h b/sys/include/net/gnrc/netreg.h index a31782483e82..321c0a7ef4c1 100644 --- a/sys/include/net/gnrc/netreg.h +++ b/sys/include/net/gnrc/netreg.h @@ -23,7 +23,7 @@ #include -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc/nettype.h" #include "net/gnrc/pkt.h" diff --git a/sys/include/net/gnrc/pkt.h b/sys/include/net/gnrc/pkt.h index c704d9093152..6f8b371d8a0a 100644 --- a/sys/include/net/gnrc/pkt.h +++ b/sys/include/net/gnrc/pkt.h @@ -25,7 +25,7 @@ #include #include -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc/nettype.h" #include "list.h" diff --git a/sys/include/net/gnrc/pktdump.h b/sys/include/net/gnrc/pktdump.h index 4448dbee068c..bac76cd0e409 100644 --- a/sys/include/net/gnrc/pktdump.h +++ b/sys/include/net/gnrc/pktdump.h @@ -22,7 +22,7 @@ #ifndef NET_GNRC_PKTDUMP_H #define NET_GNRC_PKTDUMP_H -#include "kernel_types.h" +#include "sched.h" #ifdef __cplusplus extern "C" { diff --git a/sys/include/net/gnrc/sixlowpan.h b/sys/include/net/gnrc/sixlowpan.h index e7c0c813574c..caca204c16e4 100644 --- a/sys/include/net/gnrc/sixlowpan.h +++ b/sys/include/net/gnrc/sixlowpan.h @@ -137,7 +137,7 @@ #include -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc/sixlowpan/config.h" #include "net/gnrc/sixlowpan/frag.h" diff --git a/sys/include/net/gnrc/sixlowpan/frag/fb.h b/sys/include/net/gnrc/sixlowpan/frag/fb.h index 4bcef54626d9..1181c497a619 100644 --- a/sys/include/net/gnrc/sixlowpan/frag/fb.h +++ b/sys/include/net/gnrc/sixlowpan/frag/fb.h @@ -88,7 +88,7 @@ gnrc_sixlowpan_frag_fb_t *gnrc_sixlowpan_frag_fb_get_by_tag(uint16_t tag); uint16_t gnrc_sixlowpan_frag_fb_next_tag(void); #if defined(TEST_SUITES) && !defined(DOXYGEN) -#include "kernel_types.h" +#include "sched.h" /* can't include `net/sixlowpan.h` as this would create a cyclical include */ extern kernel_pid_t gnrc_sixlowpan_get_pid(void); diff --git a/sys/include/usb/usbus.h b/sys/include/usb/usbus.h index 8be56c1a10f6..1e5a8c727f4d 100644 --- a/sys/include/usb/usbus.h +++ b/sys/include/usb/usbus.h @@ -28,7 +28,7 @@ #include "clist.h" #include "event.h" -#include "kernel_types.h" +#include "sched.h" #include "kernel_defines.h" #include "msg.h" #include "thread.h" diff --git a/sys/include/xtimer.h b/sys/include/xtimer.h index fd732abe057f..1e09cb129cba 100644 --- a/sys/include/xtimer.h +++ b/sys/include/xtimer.h @@ -36,7 +36,7 @@ #include "msg.h" #endif /* MODULE_CORE_MSG */ #include "mutex.h" -#include "kernel_types.h" +#include "sched.h" #include "rmutex.h" #ifdef MODULE_ZTIMER_XTIMER_COMPAT diff --git a/sys/include/ztimer.h b/sys/include/ztimer.h index b5182088edc4..df27ede996a4 100644 --- a/sys/include/ztimer.h +++ b/sys/include/ztimer.h @@ -234,7 +234,7 @@ #include -#include "kernel_types.h" +#include "sched.h" #include "msg.h" #ifdef __cplusplus diff --git a/sys/include/ztimer/xtimer_compat.h b/sys/include/ztimer/xtimer_compat.h index 6f4bddb69c79..b6549bd77869 100644 --- a/sys/include/ztimer/xtimer_compat.h +++ b/sys/include/ztimer/xtimer_compat.h @@ -28,7 +28,7 @@ #include "msg.h" #endif /* MODULE_CORE_MSG */ #include "mutex.h" -#include "kernel_types.h" +#include "sched.h" #include "ztimer.h" diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index c6ba081b0c47..2de00e89ae1b 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -19,7 +19,7 @@ #include "byteorder.h" #include "cpu_conf.h" -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc.h" #include "net/gnrc/icmpv6.h" #include "net/gnrc/sixlowpan/ctx.h" diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h index 0abc44f52fc0..cc3e62a86323 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.h @@ -27,7 +27,7 @@ #include "bitfield.h" #include "evtimer_msg.h" -#include "kernel_types.h" +#include "sched.h" #include "mutex.h" #include "net/eui64.h" #include "net/ipv6/addr.h" diff --git a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c index adb0c69b5ef5..3863c01619da 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c +++ b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c @@ -14,7 +14,7 @@ #include -#include "kernel_types.h" +#include "sched.h" #include "net/gnrc.h" #include "thread.h" #include "utlist.h" diff --git a/sys/ps/ps.c b/sys/ps/ps.c index 0f175fdfbf3f..808945346a8a 100644 --- a/sys/ps/ps.c +++ b/sys/ps/ps.c @@ -21,7 +21,7 @@ #include "thread.h" #include "sched.h" #include "thread.h" -#include "kernel_types.h" +#include "sched.h" #ifdef MODULE_SCHEDSTATISTICS #include "schedstatistics.h" diff --git a/sys/shell/commands/sc_gnrc_icmpv6_echo.c b/sys/shell/commands/sc_gnrc_icmpv6_echo.c index 2f241a1986b1..654f2483eb16 100644 --- a/sys/shell/commands/sc_gnrc_icmpv6_echo.c +++ b/sys/shell/commands/sc_gnrc_icmpv6_echo.c @@ -26,7 +26,7 @@ #include "bitfield.h" #include "byteorder.h" -#include "kernel_types.h" +#include "sched.h" #ifdef MODULE_LUID #include "luid.h" #endif diff --git a/sys/vfs/vfs.c b/sys/vfs/vfs.c index b0dd00b62d79..a312e98474ce 100644 --- a/sys/vfs/vfs.c +++ b/sys/vfs/vfs.c @@ -26,7 +26,7 @@ #include "vfs.h" #include "mutex.h" #include "thread.h" -#include "kernel_types.h" +#include "sched.h" #include "clist.h" #define ENABLE_DEBUG 0 diff --git a/tests/bench_sizeof_coretypes/main.c b/tests/bench_sizeof_coretypes/main.c index 76ac94fbcb0c..b8cce4f19325 100644 --- a/tests/bench_sizeof_coretypes/main.c +++ b/tests/bench_sizeof_coretypes/main.c @@ -25,7 +25,7 @@ #include "cib.h" #include "clist.h" #include "panic.h" -#include "kernel_types.h" +#include "sched.h" #include "list.h" #include "mbox.h" #include "msg.h" diff --git a/tests/thread_flood/main.c b/tests/thread_flood/main.c index 4ee83d2c29f4..0ba61374abe4 100644 --- a/tests/thread_flood/main.c +++ b/tests/thread_flood/main.c @@ -25,7 +25,7 @@ #include #include "thread.h" -#include "kernel_types.h" +#include "sched.h" /* One stack for all threads. DON'T TRY THIS AT HOME!! */ static char dummy_stack[THREAD_STACKSIZE_IDLE]; From ba28bf849ccb05531c3666370b6e23274b0f4f8f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 20 Nov 2020 12:34:25 +0100 Subject: [PATCH 06/11] cpu/esp_common: add missing include for limits.h in freertos/task.h --- cpu/esp_common/include/freertos/task.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/esp_common/include/freertos/task.h b/cpu/esp_common/include/freertos/task.h index 7d99e2209d5b..1eeca9550a49 100644 --- a/cpu/esp_common/include/freertos/task.h +++ b/cpu/esp_common/include/freertos/task.h @@ -13,6 +13,8 @@ #ifndef DOXYGEN +#include /* for INT_MAX */ + #include "thread.h" #include "freertos/FreeRTOS.h" From 3f0ea8696337fea820d3005674fe4e39bc4e29ed Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 23 Nov 2020 11:31:18 +0100 Subject: [PATCH 07/11] cpu/stm32/include/periph_cpu.h: add missing limits.h include --- cpu/stm32/include/periph_cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/stm32/include/periph_cpu.h b/cpu/stm32/include/periph_cpu.h index 817ddfdd44c3..5ca6def4791d 100644 --- a/cpu/stm32/include/periph_cpu.h +++ b/cpu/stm32/include/periph_cpu.h @@ -21,6 +21,8 @@ #ifndef PERIPH_CPU_H #define PERIPH_CPU_H +#include + #include "cpu.h" #include "macros/units.h" From 1c0560a205b2f1392bad15a5a6b119546952f7bc Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 23 Nov 2020 11:41:12 +0100 Subject: [PATCH 08/11] tests/bitarithm_timings: add limits.h include --- tests/bitarithm_timings/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bitarithm_timings/main.c b/tests/bitarithm_timings/main.c index a3f91b83f268..cbf824ed6101 100644 --- a/tests/bitarithm_timings/main.c +++ b/tests/bitarithm_timings/main.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "bitarithm.h" #include "xtimer.h" From ff5a60396f5518419c90ae00c206f0eac399384f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 23 Nov 2020 12:46:20 +0100 Subject: [PATCH 09/11] pkg/ndn-riot: add patch for changed kernel_pid_t location --- ...adapt-to-moved-kernel_pid_t-location.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkg/ndn-riot/patches/0003-adapt-to-moved-kernel_pid_t-location.patch diff --git a/pkg/ndn-riot/patches/0003-adapt-to-moved-kernel_pid_t-location.patch b/pkg/ndn-riot/patches/0003-adapt-to-moved-kernel_pid_t-location.patch new file mode 100644 index 000000000000..76231a764801 --- /dev/null +++ b/pkg/ndn-riot/patches/0003-adapt-to-moved-kernel_pid_t-location.patch @@ -0,0 +1,39 @@ +From 51d973f2a0a04a716af8260c62fb5045356a30a5 Mon Sep 17 00:00:00 2001 +From: Kaspar Schleiser +Date: Mon, 23 Nov 2020 12:44:54 +0100 +Subject: [PATCH] adapt to moved kernel_pid_t location + +--- + face-table.h | 2 +- + ndn.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/face-table.h b/face-table.h +index 28b44a5c02..fb0c39b083 100644 +--- a/face-table.h ++++ b/face-table.h +@@ -20,7 +20,7 @@ + #ifndef NDN_FACE_TABLE_H_ + #define NDN_FACE_TABLE_H_ + +-#include ++#include "sched.h" + + #ifdef __cplusplus + extern "C" { +diff --git a/ndn.h b/ndn.h +index d8d148c7f7..47d2032301 100644 +--- a/ndn.h ++++ b/ndn.h +@@ -20,7 +20,7 @@ + #ifndef NDN_H_ + #define NDN_H_ + +-#include ++#include "sched.h" + + #ifdef __cplusplus + extern "C" { +-- +2.29.2 + From d6b6c0e98f3ec688a5ee24921ba4134bd1385bbf Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 23 Nov 2020 14:00:54 +0100 Subject: [PATCH 10/11] sys/sema: add missing limits.h --- sys/sema/sema.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sema/sema.c b/sys/sema/sema.c index c3696be8dff5..035c007c8b5f 100644 --- a/sys/sema/sema.c +++ b/sys/sema/sema.c @@ -16,6 +16,8 @@ */ #include +#include + #include "irq.h" #include "assert.h" #include "sema.h" From 1711b4b64926d4945f88f50986d7eb32f813b6dc Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 23 Nov 2020 17:13:35 +0100 Subject: [PATCH 11/11] core/include/kernel_types.h: re-add c++ compat parts --- core/include/kernel_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/include/kernel_types.h b/core/include/kernel_types.h index f99f3434334c..42bb52591c4c 100644 --- a/core/include/kernel_types.h +++ b/core/include/kernel_types.h @@ -45,5 +45,13 @@ typedef signed ssize_t; # endif #endif +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + #endif /* KERNEL_TYPES_H */ /** @} */