mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
getrlimit:implement RLIMIT_STACK return limit stack size
Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
parent
837410fad2
commit
a8843a073f
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue