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:
parent
624d69ee05
commit
af2aa13873
@ -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 */
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user