mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
getrlimit:implement RLIMIT_STACK return limit stack size
Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user