getrlimit:implement RLIMIT_STACK return limit stack size

Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
meijian 2023-10-20 17:09:43 +08:00 committed by Xiang Xiao
parent 837410fad2
commit a8843a073f

View file

@ -28,6 +28,7 @@
#include <errno.h>
#include <sys/resource.h>
#include <pthread.h>
/****************************************************************************
* Public Functions
@ -64,7 +65,12 @@ int getrlimit(int resource, FAR struct rlimit *rlp)
rlp->rlim_max = OPEN_MAX;
}
break;
case RLIMIT_STACK:
{
rlp->rlim_cur = PTHREAD_STACK_DEFAULT;
rlp->rlim_max = RLIM_INFINITY;
}
break;
default:
break;
}