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)