From 8f5a94c5e520fc1156b3115c4b9d7fa909c961da Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Thu, 4 Apr 2019 10:33:57 -0600 Subject: [PATCH] include/pthread.h and libs/libcpthread: Fixed pthread_attr_get/setstacksize param type to size_t. --- include/pthread.h | 4 ++-- libs/libc/libc.csv | 4 ++-- libs/libc/pthread/pthread_attr_getstacksize.c | 2 +- libs/libc/pthread/pthread_attr_setstacksize.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/pthread.h b/include/pthread.h index 0fd42902e2..11866ae584 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -463,8 +463,8 @@ int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr, /* Set or obtain the default stack size */ -int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize); -int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, long *stackaddr); +int pthread_attr_setstacksize(FAR pthread_attr_t *attr, size_t stacksize); +int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, size_t *stackaddr); /* Set or obtain stack address and size attributes */ diff --git a/libs/libc/libc.csv b/libs/libc/libc.csv index 1d97a677a2..15cfeaa379 100644 --- a/libs/libc/libc.csv +++ b/libs/libc/libc.csv @@ -100,12 +100,12 @@ "pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *" "pthread_attr_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR struct sched_param *" "pthread_attr_getschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int *" -"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR long *" +"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR size_t *" "pthread_attr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *" "pthread_attr_setinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int" "pthread_attr_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR const struct sched_param *" "pthread_attr_setschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int" -"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","long" +"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","size_t" "pthread_barrierattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *" "pthread_barrierattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_barrierattr_t *","FAR int *" "pthread_barrierattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *" diff --git a/libs/libc/pthread/pthread_attr_getstacksize.c b/libs/libc/pthread/pthread_attr_getstacksize.c index 2bcd5e126c..22b1915d1a 100644 --- a/libs/libc/pthread/pthread_attr_getstacksize.c +++ b/libs/libc/pthread/pthread_attr_getstacksize.c @@ -63,7 +63,7 @@ * ****************************************************************************/ -int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR long *stacksize) +int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR size_t *stacksize) { int ret; diff --git a/libs/libc/pthread/pthread_attr_setstacksize.c b/libs/libc/pthread/pthread_attr_setstacksize.c index 2702f14395..2fefa0880f 100644 --- a/libs/libc/pthread/pthread_attr_setstacksize.c +++ b/libs/libc/pthread/pthread_attr_setstacksize.c @@ -64,7 +64,7 @@ * ****************************************************************************/ -int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize) +int pthread_attr_setstacksize(FAR pthread_attr_t *attr, size_t stacksize) { int ret;