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 <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-21 10:27:48 +08:00 committed by Masayuki Ishikawa
parent 624d69ee05
commit af2aa13873
3 changed files with 6 additions and 6 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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)