projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
make pthread_create return EAGAIN on resource failure, as required by POSIX
[oweals/musl.git]
/
src
/
misc
/
getrlimit.c
1
#include <sys/resource.h>
2
#include "syscall.h"
3
#include "libc.h"
4
5
int getrlimit(int resource, struct rlimit *rlim)
6
{
7
long k_rlim[2];
8
if (syscall2(__NR_ugetrlimit, resource, (long)k_rlim) < 0)
9
return -1;
10
rlim->rlim_cur = k_rlim[0];
11
rlim->rlim_max = k_rlim[1];
12
return 0;
13
}
14
15
LFS64(getrlimit);