This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new af2aa13873 phtread: Change stacksize type from long to size_t af2aa13873 is described below commit af2aa138734eff9a1b35fc87c0685cd798f4d9be Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Mon Nov 21 10:27:48 2022 +0800 phtread: Change stacksize type from long to size_t follow the standard prototype: https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_getstack.html Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- include/pthread.h | 6 +++--- libs/libc/pthread/pthread_attr_getstack.c | 2 +- libs/libc/pthread/pthread_attr_setstack.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/pthread.h b/include/pthread.h index 3addc37340..05616a54c6 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -459,14 +459,14 @@ int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr, int pthread_attr_setstacksize(FAR pthread_attr_t *attr, size_t stacksize); int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, - FAR size_t *stackaddr); + FAR size_t *stacksize); /* Set or obtain stack address and size attributes */ int pthread_attr_setstack(FAR pthread_attr_t *attr, - FAR void *stackaddr, long stacksize); + FAR void *stackaddr, size_t stacksize); int pthread_attr_getstack(FAR pthread_attr_t *attr, - FAR void **stackaddr, FAR long *stacksize); + FAR void **stackaddr, FAR size_t *stacksize); /* Set or get the name of a thread */ diff --git a/libs/libc/pthread/pthread_attr_getstack.c b/libs/libc/pthread/pthread_attr_getstack.c index 42515e5dac..8b3c143c8f 100644 --- a/libs/libc/pthread/pthread_attr_getstack.c +++ b/libs/libc/pthread/pthread_attr_getstack.c @@ -49,7 +49,7 @@ ****************************************************************************/ int pthread_attr_getstack(FAR pthread_attr_t *attr, - FAR void **stackaddr, FAR long *stacksize) + FAR void **stackaddr, FAR size_t *stacksize) { int ret; diff --git a/libs/libc/pthread/pthread_attr_setstack.c b/libs/libc/pthread/pthread_attr_setstack.c index 9320107fca..65e06fb01e 100644 --- a/libs/libc/pthread/pthread_attr_setstack.c +++ b/libs/libc/pthread/pthread_attr_setstack.c @@ -51,11 +51,11 @@ ****************************************************************************/ int pthread_attr_setstack(FAR pthread_attr_t *attr, - FAR void *stackaddr, long stacksize) + FAR void *stackaddr, size_t stacksize) { int ret; - linfo("attr=%p stackaddr=%p stacksize=%ld\n", + linfo("attr=%p stackaddr=%p stacksize=%zu\n", attr, stackaddr, stacksize); if (!attr || !stackaddr || stacksize < PTHREAD_STACK_MIN)