From 13432d41c6063fee573d57150ddd1c9d4c2f16c0 Mon Sep 17 00:00:00 2001 From: Liu_Weichao Date: Thu, 18 May 2023 16:48:55 +0800 Subject: [PATCH] fix compile error when gcc using <-with-newlib> function --- .../xizi/user_api/posix_support/include/pthread arm.h | 2 ++ Ubiquitous/XiZi_IIoT/board/cortex-m0-emulator/.defconfig | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread arm.h b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread arm.h index c5b23a0f1..d7be4dc16 100644 --- a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread arm.h +++ b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread arm.h @@ -29,6 +29,7 @@ extern "C" { #include #include +#if !defined(_SYS_SCHED_H_) && !defined(_SYS__PTHREADTYPES_H_) typedef int pid_t; typedef unsigned long int pthread_t; @@ -59,6 +60,7 @@ typedef struct pthread_mutexattr { } pthread_mutexattr_t; typedef int pthread_mutex_t ; +#endif #ifdef __cplusplus } diff --git a/Ubiquitous/XiZi_IIoT/board/cortex-m0-emulator/.defconfig b/Ubiquitous/XiZi_IIoT/board/cortex-m0-emulator/.defconfig index 29620e5d2..3c3d859bb 100644 --- a/Ubiquitous/XiZi_IIoT/board/cortex-m0-emulator/.defconfig +++ b/Ubiquitous/XiZi_IIoT/board/cortex-m0-emulator/.defconfig @@ -100,8 +100,8 @@ CONFIG_SMALL_NUMBER_64B=16 # # CONFIG_KERNEL_SEMAPHORE=y # CONFIG_KERNEL_MUTEX=y -CONFIG_KERNEL_EVENT=n -CONFIG_KERNEL_MESSAGEQUEUE=n +CONFIG_KERNEL_EVENT=y +CONFIG_KERNEL_MESSAGEQUEUE=y CONFIG_KTASK_PRIORITY_8=y CONFIG_KTASK_PRIORITY_MAX=8 CONFIG_TICK_PER_SECOND=100 @@ -115,11 +115,6 @@ CONFIG_IDLE_KTASK_STACKSIZE=512 CONFIG_ZOMBIE_KTASK_STACKSIZE=512 # CONFIG_KERNEL_TASK_ISOLATION is not set -# -# Memory Management -# -# CONFIG_KERNEL_MEMBLOCK is not set - # # Command shell #