mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
sched/pthread: Added non-standard pthread_get_stackaddr_np() and pthread_get_stacksize_np().
This commit is contained in:
+6
-1
@@ -466,13 +466,18 @@ int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr,
|
||||
int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize);
|
||||
int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, long *stackaddr);
|
||||
|
||||
/* Set or obtain stack address and size */
|
||||
/* Set or obtain stack address and size attributes */
|
||||
|
||||
int pthread_attr_setstack(FAR pthread_attr_t *attr,
|
||||
FAR void *stackaddr, long stacksize);
|
||||
int pthread_attr_getstack(FAR pthread_attr_t *attr,
|
||||
FAR void **stackaddr, FAR long *stacksize);
|
||||
|
||||
/* Get run-time stack address and size */
|
||||
|
||||
FAR void *pthread_get_stackaddr_np(FAR pthread_t thread);
|
||||
ssize_t pthread_get_stacksize_np(FAR pthread_t thread);
|
||||
|
||||
/* To create a thread object and runnable thread, a routine must be specified
|
||||
* as the new thread's start routine. An argument may be passed to this
|
||||
* routine, as an untyped address; an untyped address may also be returned as
|
||||
|
||||
+15
-13
@@ -425,22 +425,24 @@
|
||||
# define SYS_pthread_create (__SYS_pthread + 4)
|
||||
# define SYS_pthread_detach (__SYS_pthread + 5)
|
||||
# define SYS_pthread_exit (__SYS_pthread + 6)
|
||||
# define SYS_pthread_getschedparam (__SYS_pthread + 7)
|
||||
# define SYS_pthread_getspecific (__SYS_pthread + 8)
|
||||
# define SYS_pthread_join (__SYS_pthread + 9)
|
||||
# define SYS_pthread_key_create (__SYS_pthread + 10)
|
||||
# define SYS_pthread_key_delete (__SYS_pthread + 11)
|
||||
# define SYS_pthread_mutex_destroy (__SYS_pthread + 12)
|
||||
# define SYS_pthread_mutex_init (__SYS_pthread + 13)
|
||||
# define SYS_pthread_mutex_timedlock (__SYS_pthread + 14)
|
||||
# define SYS_pthread_mutex_trylock (__SYS_pthread + 15)
|
||||
# define SYS_pthread_mutex_unlock (__SYS_pthread + 16)
|
||||
# define SYS_pthread_get_stackaddr_np (__SYS_pthread + 7)
|
||||
# define SYS_pthread_get_stacksize_np (__SYS_pthread + 8)
|
||||
# define SYS_pthread_getschedparam (__SYS_pthread + 9)
|
||||
# define SYS_pthread_getspecific (__SYS_pthread + 10)
|
||||
# define SYS_pthread_join (__SYS_pthread + 11)
|
||||
# define SYS_pthread_key_create (__SYS_pthread + 12)
|
||||
# define SYS_pthread_key_delete (__SYS_pthread + 13)
|
||||
# define SYS_pthread_mutex_destroy (__SYS_pthread + 14)
|
||||
# define SYS_pthread_mutex_init (__SYS_pthread + 15)
|
||||
# define SYS_pthread_mutex_timedlock (__SYS_pthread + 16)
|
||||
# define SYS_pthread_mutex_trylock (__SYS_pthread + 17)
|
||||
# define SYS_pthread_mutex_unlock (__SYS_pthread + 18)
|
||||
|
||||
#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
|
||||
# define SYS_pthread_mutex_consistent (__SYS_pthread + 17)
|
||||
# define __SYS_pthread_setschedparam (__SYS_pthread + 18)
|
||||
# define SYS_pthread_mutex_consistent (__SYS_pthread + 19)
|
||||
# define __SYS_pthread_setschedparam (__SYS_pthread + 20)
|
||||
#else
|
||||
# define __SYS_pthread_setschedparam (__SYS_pthread + 17)
|
||||
# define __SYS_pthread_setschedparam (__SYS_pthread + 19)
|
||||
#endif
|
||||
|
||||
# define SYS_pthread_setschedparam (__SYS_pthread_setschedparam + 0)
|
||||
|
||||
Reference in New Issue
Block a user