From c1dc451a00f5456587683a0f2a052022620899a9 Mon Sep 17 00:00:00 2001 From: atwww <81611821+atwwww@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPOSIX=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=AD=98=E5=82=A8=E5=AF=BB=E6=89=BEposix?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E5=8F=A5=E6=9F=84=E6=97=B6=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=94=99=E8=AF=AF=20(#8790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add GCC generalized atomic operation function * 修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误 --- components/libc/posix/pthreads/pthread_tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/libc/posix/pthreads/pthread_tls.c b/components/libc/posix/pthreads/pthread_tls.c index 041318666c..2e709acb60 100644 --- a/components/libc/posix/pthreads/pthread_tls.c +++ b/components/libc/posix/pthreads/pthread_tls.c @@ -28,7 +28,7 @@ void *pthread_getspecific(pthread_key_t key) if (rt_thread_self() == NULL) return NULL; /* get pthread data from user data of thread */ - ptd = (_pthread_data_t *)rt_thread_self()->user_data; + ptd = (_pthread_data_t *)rt_thread_self()->pthread_data; RT_ASSERT(ptd != NULL); if (ptd->tls == NULL) @@ -48,7 +48,7 @@ int pthread_setspecific(pthread_key_t key, const void *value) if (rt_thread_self() == NULL) return EINVAL; /* get pthread data from user data of thread */ - ptd = (_pthread_data_t *)rt_thread_self()->user_data; + ptd = (_pthread_data_t *)rt_thread_self()->pthread_data; RT_ASSERT(ptd != NULL); /* check tls area */