diff options
| author | atwww <[email protected]> | 2024-04-15 23:13:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-15 23:13:24 +0800 |
| commit | 2cc88b6cf50fe9cf6ed6f1816deaba07a896ed25 (patch) | |
| tree | 715a7ad730fc9d66a979cb651968b9448a4fed40 /components | |
| parent | 5730097296283354082fc597a9421252aedc6b1c (diff) | |
修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误 (#8790)
* Add GCC generalized atomic operation function
* 修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/posix/pthreads/pthread_tls.c | 4 |
1 files 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 */ |
