mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Move pthread-specific data into TLS
1. Move pthread-specific data files from sched/pthread/ to libs/libc/pthread. 2. Remove pthread-specific data functions from syscalls. 3. Implement tls_alloc() and tls_free() with system calls. 4. Reimplement pthread_key_create() and pthread_key_free() using tls_alloc() and tls_free(). 5. Reimplement pthread_set_specific() and pthread_get_specicif() using tls_set_value() and tls_get_value()
This commit is contained in:
committed by
Abdelatif Guettouche
parent
a6c82a27db
commit
9ce03b1660
+2
-4
@@ -87,10 +87,7 @@
|
||||
"pthread_exit","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","void","pthread_addr_t"
|
||||
"pthread_getaffinity_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)","int","pthread_t","size_t","FAR cpu_set_t*"
|
||||
"pthread_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","FAR int *","FAR struct sched_param *"
|
||||
"pthread_getspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","FAR void *","pthread_key_t"
|
||||
"pthread_join","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","FAR pthread_addr_t *"
|
||||
"pthread_key_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_key_t *","CODE void (*)(FAR void*)"
|
||||
"pthread_key_delete","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_key_t"
|
||||
"pthread_kill","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int"
|
||||
"pthread_mutex_consistent","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE)","int","FAR pthread_mutex_t *"
|
||||
"pthread_mutex_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t *"
|
||||
@@ -101,7 +98,6 @@
|
||||
"pthread_setaffinity_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)","int","pthread_t","size_t","FAR const cpu_set_t *"
|
||||
"pthread_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int","FAR const struct sched_param *"
|
||||
"pthread_setschedprio","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int"
|
||||
"pthread_setspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_key_t","FAR const void *"
|
||||
"pthread_sigmask","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","int","FAR const sigset_t *","FAR sigset_t *"
|
||||
"putenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
|
||||
"pwrite","unistd.h","","ssize_t","int","FAR const void *","size_t","off_t"
|
||||
@@ -175,6 +171,8 @@
|
||||
"timer_getoverrun","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t"
|
||||
"timer_gettime","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t","FAR struct itimerspec *"
|
||||
"timer_settime","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t","int","FAR const struct itimerspec *","FAR struct itimerspec *"
|
||||
"tls_alloc","nuttx/tls.h","CONFIG_TLS_NELEM > 0","int"
|
||||
"tls_free","nuttx/tls.h","CONFIG_TLS_NELEM > 0","int","int"
|
||||
"umount2","sys/mount.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *","unsigned int"
|
||||
"uname","sys/utsname.h","","int","FAR struct utsname *"
|
||||
"unlink","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *"
|
||||
|
||||
|
Reference in New Issue
Block a user