From a5f7635f31b237ad8ce09610ee76a75f4072e7d4 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sat, 22 May 2021 02:50:35 +0800 Subject: remove libc_errno.h & libc_limits.h --- components/libc/pthreads/posix_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/libc/pthreads') diff --git a/components/libc/pthreads/posix_types.h b/components/libc/pthreads/posix_types.h index 942657ef39..5838e8b370 100644 --- a/components/libc/pthreads/posix_types.h +++ b/components/libc/pthreads/posix_types.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #endif -- cgit v1.3.1 From b277135f06c8a62d0447dac06ee08cd3d11fc3ac Mon Sep 17 00:00:00 2001 From: CornerOfSkyline Date: Fri, 9 Jul 2021 11:51:48 +0800 Subject: Fix the sem init check bug in pthread. --- components/libc/pthreads/semaphore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/libc/pthreads') diff --git a/components/libc/pthreads/semaphore.c b/components/libc/pthreads/semaphore.c index 398cdf1f49..199b33bfe8 100644 --- a/components/libc/pthreads/semaphore.c +++ b/components/libc/pthreads/semaphore.c @@ -186,7 +186,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value) rt_snprintf(name, sizeof(name), "psem%02d", psem_number++); sem->sem = rt_sem_create(name, value, RT_IPC_FLAG_FIFO); - if (sem == RT_NULL) + if (sem->sem == RT_NULL) { rt_set_errno(ENOMEM); -- cgit v1.3.1