pthread: add pthread_self/pthread_gettid_np function

explicitly defined functions can support assignment as function pointers

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2024-06-17 17:27:14 +08:00
committed by Xiang Xiao
parent c3b05bde44
commit e14ae3e681
6 changed files with 104 additions and 3 deletions
+2
View File
@@ -214,6 +214,7 @@
"pthread_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_t *","FAR const pthread_attr_t *","pthread_startroutine_t","pthread_addr_t"
"pthread_getname_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","char *","size_t"
"pthread_getspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","FAR void *","pthread_key_t"
"pthread_gettid_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","pid_t","pthread_t"
"pthread_key_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","FAR pthread_key_t *","FAR void (*) (void *)|FAR void *"
"pthread_key_delete","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","pthread_key_t"
"pthread_mutex_lock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t *"
@@ -228,6 +229,7 @@
"pthread_rwlock_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *restrict","FAR const pthread_rwlockattr_t *"
"pthread_rwlock_rdlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *"
"pthread_rwlock_unlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_rwlock_t *"
"pthread_self","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","pthread_t","void"
"pthread_setname_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","const char *"
"pthread_setspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0","int","pthread_key_t","FAR const void *"
"pthread_yield","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","void"
1 __assert assert.h void FAR const char * int FAR const char *
214 pthread_create pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_t * FAR const pthread_attr_t * pthread_startroutine_t
215 pthread_getname_np pthread.h !defined(CONFIG_DISABLE_PTHREAD) int pthread_t char * size_t
216 pthread_getspecific pthread.h !defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0 FAR void * pthread_key_t
217 pthread_gettid_np pthread.h !defined(CONFIG_DISABLE_PTHREAD) pid_t pthread_t
218 pthread_key_create pthread.h !defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0 int FAR pthread_key_t * FAR void (*) (void *)|FAR void *
219 pthread_key_delete pthread.h !defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0 int pthread_key_t
220 pthread_mutex_lock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t *
229 pthread_rwlock_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_rwlock_t *restrict FAR const pthread_rwlockattr_t *
230 pthread_rwlock_rdlock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_rwlock_t *
231 pthread_rwlock_unlock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_rwlock_t *
232 pthread_self pthread.h !defined(CONFIG_DISABLE_PTHREAD) pthread_t void
233 pthread_setname_np pthread.h !defined(CONFIG_DISABLE_PTHREAD) int pthread_t const char *
234 pthread_setspecific pthread.h !defined(CONFIG_DISABLE_PTHREAD) && CONFIG_TLS_NELEM > 0 int pthread_key_t FAR const void *
235 pthread_yield pthread.h !defined(CONFIG_DISABLE_PTHREAD) void