projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not try to interpret implementation specific strings as tz definition
[musl]
/
include
/
sys
/
resource.h
diff --git
a/include/sys/resource.h
b/include/sys/resource.h
index
7837adb
..
58392d6
100644
(file)
--- a/
include/sys/resource.h
+++ b/
include/sys/resource.h
@@
-1,11
+1,21
@@
#ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H
#ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+#include <sys/time.h>
+
#define __NEED_id_t
#define __NEED_id_t
-#define __NEED_time_t
-#define __NEED_struct_timeval
+
+#ifdef _GNU_SOURCE
+#define __NEED_pid_t
+#endif
#include <bits/alltypes.h>
#include <bits/alltypes.h>
+#include <bits/resource.h>
typedef unsigned long long rlim_t;
typedef unsigned long long rlim_t;
@@
-45,6
+55,14
@@
int getrusage (int, struct rusage *);
int getpriority (int, id_t);
int setpriority (int, id_t, int);
int getpriority (int, id_t);
int setpriority (int, id_t, int);
+#ifdef _GNU_SOURCE
+int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
+#define prlimit64 prlimit
+#endif
+
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+
#define PRIO_PROCESS 0
#define PRIO_PGRP 1
#define PRIO_USER 2
#define PRIO_PROCESS 0
#define PRIO_PGRP 1
#define PRIO_USER 2
@@
-61,11
+79,13
@@
int setpriority (int, id_t, int);
#define RLIMIT_DATA 2
#define RLIMIT_STACK 3
#define RLIMIT_CORE 4
#define RLIMIT_DATA 2
#define RLIMIT_STACK 3
#define RLIMIT_CORE 4
+#ifndef RLIMIT_RSS
#define RLIMIT_RSS 5
#define RLIMIT_RSS 5
-#define RLIMIT_NOFILE 7
-#define RLIMIT_AS 9
#define RLIMIT_NPROC 6
#define RLIMIT_NPROC 6
+#define RLIMIT_NOFILE 7
#define RLIMIT_MEMLOCK 8
#define RLIMIT_MEMLOCK 8
+#define RLIMIT_AS 9
+#endif
#define RLIMIT_LOCKS 10
#define RLIMIT_SIGPENDING 11
#define RLIMIT_MSGQUEUE 12
#define RLIMIT_LOCKS 10
#define RLIMIT_SIGPENDING 11
#define RLIMIT_MSGQUEUE 12
@@
-75,5
+95,15
@@
int setpriority (int, id_t, int);
#define RLIM_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIMIT_NLIMITS
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
+#define getrlimit64 getrlimit
+#define setrlimit64 setrlimit
+#define rlimit64 rlimit
+#define rlim64_t rlim_t
+#endif
+
+#ifdef __cplusplus
+}
+#endif
#endif
#endif