From 9660d3d737407d02738467965d19159b5b9421b7 Mon Sep 17 00:00:00 2001 From: BernardXiong Date: Mon, 21 Jun 2021 21:21:32 +0800 Subject: [PATCH 1/4] [kernel] fix the spinlock issue --- include/rthw.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rthw.h b/include/rthw.h index f86618a575..6492bec2e9 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -151,6 +151,7 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void *context)); void rt_hw_us_delay(rt_uint32_t us); #ifdef RT_USING_SMP +#include /* for spinlock from arch */ struct rt_spinlock { -- Gitee From 42233466300b0e0200637a25fb95a903d0fa6b93 Mon Sep 17 00:00:00 2001 From: BernardXiong Date: Mon, 21 Jun 2021 21:21:56 +0800 Subject: [PATCH 2/4] [kernel] add RT_IPC_CMD_GET_STATE definition --- include/rtdef.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rtdef.h b/include/rtdef.h index 1e7f5167ba..260bb45b7b 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -775,6 +775,7 @@ typedef struct rt_thread *rt_thread_t; #define RT_IPC_CMD_UNKNOWN 0x00 /**< unknown IPC command */ #define RT_IPC_CMD_RESET 0x01 /**< reset IPC object */ +#define RT_IPC_CMD_GET_STATE 0x02 /**< get the state of IPC object */ #define RT_WAITING_FOREVER -1 /**< Block forever until get resource. */ #define RT_WAITING_NO 0 /**< Non-block. */ -- Gitee From e2e4090228175d1aab2ddc6264c17c499827f822 Mon Sep 17 00:00:00 2001 From: BernardXiong Date: Mon, 21 Jun 2021 21:22:56 +0800 Subject: [PATCH 3/4] [kernel] fix MUSL libc issue in errno.h --- include/libc/libc_errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h index 37f1ed4460..d34a143fae 100644 --- a/include/libc/libc_errno.h +++ b/include/libc/libc_errno.h @@ -13,7 +13,7 @@ #include -#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined(__ARMCC_GNUC__) +#if defined(RT_USING_NEWLIB) || defined(RT_USING_MUSL) || defined(_WIN32) || defined(__ARMCC_GNUC__) /* use errno.h file in toolchains */ #include #endif @@ -45,7 +45,7 @@ defined in armcc/errno.h #define ERROR_BASE_NO 0 #endif -#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !defined(__ARMCC_GNUC__) +#if !defined(RT_USING_NEWLIB) && !defined(RT_USING_MUSL) && !defined(_WIN32) && !defined(__ARMCC_GNUC__) #define EPERM (ERROR_BASE_NO + 1) #define ENOENT (ERROR_BASE_NO + 2) -- Gitee From 8a8e411416d529454a3458dd43c05b44b6fd80c5 Mon Sep 17 00:00:00 2001 From: BernardXiong Date: Mon, 21 Jun 2021 21:23:38 +0800 Subject: [PATCH 4/4] [lwP] remove UNIX98 pty info log in SConscript --- components/lwp/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lwp/SConscript b/components/lwp/SConscript index 661a02e1f2..b77df25870 100644 --- a/components/lwp/SConscript +++ b/components/lwp/SConscript @@ -19,7 +19,7 @@ if arch == 'risc-v': cpu = 'rv64' if GetDepend('LWP_UNIX98_PTY'): - print("LWP_UNIX98_PTY") + # print("LWP_UNIX98_PTY") src += Glob('unix98pty/*.c') CPPPATH += ['unix98pty/'] -- Gitee