mirror of
https://github.com/golang/go
synced 2024-11-19 23:04:40 -07:00
syscall: add SUSv3 RLIMIT/RUSAGE constants
R=golang-dev, mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/5369092
This commit is contained in:
parent
8218251498
commit
e2467f047b
@ -118,6 +118,7 @@ includes='
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
'
|
'
|
||||||
|
|
||||||
ccflags="$@"
|
ccflags="$@"
|
||||||
@ -169,6 +170,8 @@ ccflags="$@"
|
|||||||
$2 ~ /^TIOC/ ||
|
$2 ~ /^TIOC/ ||
|
||||||
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
|
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
|
||||||
$2 ~ /^BIOC/ ||
|
$2 ~ /^BIOC/ ||
|
||||||
|
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
|
||||||
|
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
|
||||||
$2 !~ /^(BPF_TIMEVAL)$/ &&
|
$2 !~ /^(BPF_TIMEVAL)$/ &&
|
||||||
$2 ~ /^(BPF|DLT)_/ ||
|
$2 ~ /^(BPF|DLT)_/ ||
|
||||||
$2 !~ "WMESGLEN" &&
|
$2 !~ "WMESGLEN" &&
|
||||||
|
@ -903,6 +903,14 @@ const (
|
|||||||
O_TRUNC = 0x400
|
O_TRUNC = 0x400
|
||||||
O_TTY_INIT = 0x80000
|
O_TTY_INIT = 0x80000
|
||||||
O_WRONLY = 0x1
|
O_WRONLY = 0x1
|
||||||
|
RLIMIT_AS = 0xa
|
||||||
|
RLIMIT_CORE = 0x4
|
||||||
|
RLIMIT_CPU = 0x0
|
||||||
|
RLIMIT_DATA = 0x2
|
||||||
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_NOFILE = 0x8
|
||||||
|
RLIMIT_STACK = 0x3
|
||||||
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
RTAX_BRD = 0x7
|
RTAX_BRD = 0x7
|
||||||
RTAX_DST = 0x0
|
RTAX_DST = 0x0
|
||||||
@ -972,6 +980,9 @@ const (
|
|||||||
RTV_SPIPE = 0x10
|
RTV_SPIPE = 0x10
|
||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RTV_WEIGHT = 0x100
|
RTV_WEIGHT = 0x100
|
||||||
|
RUSAGE_CHILDREN = -0x1
|
||||||
|
RUSAGE_SELF = 0x0
|
||||||
|
RUSAGE_THREAD = 0x1
|
||||||
SCM_BINTIME = 0x4
|
SCM_BINTIME = 0x4
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
|
@ -903,6 +903,14 @@ const (
|
|||||||
O_TRUNC = 0x400
|
O_TRUNC = 0x400
|
||||||
O_TTY_INIT = 0x80000
|
O_TTY_INIT = 0x80000
|
||||||
O_WRONLY = 0x1
|
O_WRONLY = 0x1
|
||||||
|
RLIMIT_AS = 0xa
|
||||||
|
RLIMIT_CORE = 0x4
|
||||||
|
RLIMIT_CPU = 0x0
|
||||||
|
RLIMIT_DATA = 0x2
|
||||||
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_NOFILE = 0x8
|
||||||
|
RLIMIT_STACK = 0x3
|
||||||
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
RTAX_BRD = 0x7
|
RTAX_BRD = 0x7
|
||||||
RTAX_DST = 0x0
|
RTAX_DST = 0x0
|
||||||
@ -972,6 +980,9 @@ const (
|
|||||||
RTV_SPIPE = 0x10
|
RTV_SPIPE = 0x10
|
||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RTV_WEIGHT = 0x100
|
RTV_WEIGHT = 0x100
|
||||||
|
RUSAGE_CHILDREN = -0x1
|
||||||
|
RUSAGE_SELF = 0x0
|
||||||
|
RUSAGE_THREAD = 0x1
|
||||||
SCM_BINTIME = 0x4
|
SCM_BINTIME = 0x4
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
|
@ -582,6 +582,7 @@ const (
|
|||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
NETLINK_PKTINFO = 0x3
|
NETLINK_PKTINFO = 0x3
|
||||||
|
NETLINK_RDMA = 0x14
|
||||||
NETLINK_ROUTE = 0x0
|
NETLINK_ROUTE = 0x0
|
||||||
NETLINK_SCSITRANSPORT = 0x12
|
NETLINK_SCSITRANSPORT = 0x12
|
||||||
NETLINK_SELINUX = 0x7
|
NETLINK_SELINUX = 0x7
|
||||||
@ -699,6 +700,14 @@ const (
|
|||||||
PTRACE_SYSEMU = 0x1f
|
PTRACE_SYSEMU = 0x1f
|
||||||
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
||||||
PTRACE_TRACEME = 0x0
|
PTRACE_TRACEME = 0x0
|
||||||
|
RLIMIT_AS = 0x9
|
||||||
|
RLIMIT_CORE = 0x4
|
||||||
|
RLIMIT_CPU = 0x0
|
||||||
|
RLIMIT_DATA = 0x2
|
||||||
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_NOFILE = 0x7
|
||||||
|
RLIMIT_STACK = 0x3
|
||||||
|
RLIM_INFINITY = -0x1
|
||||||
RTAX_ADVMSS = 0x8
|
RTAX_ADVMSS = 0x8
|
||||||
RTAX_CWND = 0x7
|
RTAX_CWND = 0x7
|
||||||
RTAX_FEATURES = 0xc
|
RTAX_FEATURES = 0xc
|
||||||
@ -829,6 +838,9 @@ const (
|
|||||||
RT_CLASS_MAIN = 0xfe
|
RT_CLASS_MAIN = 0xfe
|
||||||
RT_CLASS_MAX = 0xff
|
RT_CLASS_MAX = 0xff
|
||||||
RT_CLASS_UNSPEC = 0x0
|
RT_CLASS_UNSPEC = 0x0
|
||||||
|
RUSAGE_CHILDREN = -0x1
|
||||||
|
RUSAGE_SELF = 0x0
|
||||||
|
RUSAGE_THREAD = 0x1
|
||||||
SCM_CREDENTIALS = 0x2
|
SCM_CREDENTIALS = 0x2
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x1d
|
SCM_TIMESTAMP = 0x1d
|
||||||
@ -1100,6 +1112,7 @@ const (
|
|||||||
TIOCSSOFTCAR = 0x541a
|
TIOCSSOFTCAR = 0x541a
|
||||||
TIOCSTI = 0x5412
|
TIOCSTI = 0x5412
|
||||||
TIOCSWINSZ = 0x5414
|
TIOCSWINSZ = 0x5414
|
||||||
|
TIOCVHANGUP = 0x5437
|
||||||
TUNATTACHFILTER = 0x400854d5
|
TUNATTACHFILTER = 0x400854d5
|
||||||
TUNDETACHFILTER = 0x400854d6
|
TUNDETACHFILTER = 0x400854d6
|
||||||
TUNGETFEATURES = 0x800454cf
|
TUNGETFEATURES = 0x800454cf
|
||||||
@ -1166,6 +1179,7 @@ const (
|
|||||||
EFBIG = Errno(0x1b)
|
EFBIG = Errno(0x1b)
|
||||||
EHOSTDOWN = Errno(0x70)
|
EHOSTDOWN = Errno(0x70)
|
||||||
EHOSTUNREACH = Errno(0x71)
|
EHOSTUNREACH = Errno(0x71)
|
||||||
|
EHWPOISON = Errno(0x85)
|
||||||
EIDRM = Errno(0x2b)
|
EIDRM = Errno(0x2b)
|
||||||
EILSEQ = Errno(0x54)
|
EILSEQ = Errno(0x54)
|
||||||
EINPROGRESS = Errno(0x73)
|
EINPROGRESS = Errno(0x73)
|
||||||
@ -1398,4 +1412,5 @@ var errors = [...]string{
|
|||||||
130: "owner died",
|
130: "owner died",
|
||||||
131: "state not recoverable",
|
131: "state not recoverable",
|
||||||
132: "operation not possible due to RF-kill",
|
132: "operation not possible due to RF-kill",
|
||||||
|
133: "unknown error 133",
|
||||||
}
|
}
|
||||||
|
@ -582,6 +582,7 @@ const (
|
|||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
NETLINK_PKTINFO = 0x3
|
NETLINK_PKTINFO = 0x3
|
||||||
|
NETLINK_RDMA = 0x14
|
||||||
NETLINK_ROUTE = 0x0
|
NETLINK_ROUTE = 0x0
|
||||||
NETLINK_SCSITRANSPORT = 0x12
|
NETLINK_SCSITRANSPORT = 0x12
|
||||||
NETLINK_SELINUX = 0x7
|
NETLINK_SELINUX = 0x7
|
||||||
@ -700,6 +701,14 @@ const (
|
|||||||
PTRACE_SYSEMU = 0x1f
|
PTRACE_SYSEMU = 0x1f
|
||||||
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
||||||
PTRACE_TRACEME = 0x0
|
PTRACE_TRACEME = 0x0
|
||||||
|
RLIMIT_AS = 0x9
|
||||||
|
RLIMIT_CORE = 0x4
|
||||||
|
RLIMIT_CPU = 0x0
|
||||||
|
RLIMIT_DATA = 0x2
|
||||||
|
RLIMIT_FSIZE = 0x1
|
||||||
|
RLIMIT_NOFILE = 0x7
|
||||||
|
RLIMIT_STACK = 0x3
|
||||||
|
RLIM_INFINITY = -0x1
|
||||||
RTAX_ADVMSS = 0x8
|
RTAX_ADVMSS = 0x8
|
||||||
RTAX_CWND = 0x7
|
RTAX_CWND = 0x7
|
||||||
RTAX_FEATURES = 0xc
|
RTAX_FEATURES = 0xc
|
||||||
@ -830,6 +839,9 @@ const (
|
|||||||
RT_CLASS_MAIN = 0xfe
|
RT_CLASS_MAIN = 0xfe
|
||||||
RT_CLASS_MAX = 0xff
|
RT_CLASS_MAX = 0xff
|
||||||
RT_CLASS_UNSPEC = 0x0
|
RT_CLASS_UNSPEC = 0x0
|
||||||
|
RUSAGE_CHILDREN = -0x1
|
||||||
|
RUSAGE_SELF = 0x0
|
||||||
|
RUSAGE_THREAD = 0x1
|
||||||
SCM_CREDENTIALS = 0x2
|
SCM_CREDENTIALS = 0x2
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x1d
|
SCM_TIMESTAMP = 0x1d
|
||||||
@ -1101,6 +1113,7 @@ const (
|
|||||||
TIOCSSOFTCAR = 0x541a
|
TIOCSSOFTCAR = 0x541a
|
||||||
TIOCSTI = 0x5412
|
TIOCSTI = 0x5412
|
||||||
TIOCSWINSZ = 0x5414
|
TIOCSWINSZ = 0x5414
|
||||||
|
TIOCVHANGUP = 0x5437
|
||||||
TUNATTACHFILTER = 0x401054d5
|
TUNATTACHFILTER = 0x401054d5
|
||||||
TUNDETACHFILTER = 0x401054d6
|
TUNDETACHFILTER = 0x401054d6
|
||||||
TUNGETFEATURES = 0x800454cf
|
TUNGETFEATURES = 0x800454cf
|
||||||
@ -1167,6 +1180,7 @@ const (
|
|||||||
EFBIG = Errno(0x1b)
|
EFBIG = Errno(0x1b)
|
||||||
EHOSTDOWN = Errno(0x70)
|
EHOSTDOWN = Errno(0x70)
|
||||||
EHOSTUNREACH = Errno(0x71)
|
EHOSTUNREACH = Errno(0x71)
|
||||||
|
EHWPOISON = Errno(0x85)
|
||||||
EIDRM = Errno(0x2b)
|
EIDRM = Errno(0x2b)
|
||||||
EILSEQ = Errno(0x54)
|
EILSEQ = Errno(0x54)
|
||||||
EINPROGRESS = Errno(0x73)
|
EINPROGRESS = Errno(0x73)
|
||||||
@ -1399,4 +1413,5 @@ var errors = [...]string{
|
|||||||
130: "owner died",
|
130: "owner died",
|
||||||
131: "state not recoverable",
|
131: "state not recoverable",
|
||||||
132: "operation not possible due to RF-kill",
|
132: "operation not possible due to RF-kill",
|
||||||
|
133: "unknown error 133",
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_freebsd.sh
|
// mksysnum_freebsd.pl
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
package syscall
|
package syscall
|
||||||
@ -317,5 +317,21 @@ const (
|
|||||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||||
|
SYS_CAP_NEW = 514 // { int cap_new(int fd, u_int64_t rights); }
|
||||||
|
SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
|
||||||
|
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||||
|
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||||
|
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||||
|
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||||
|
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||||
|
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||||
|
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||||
|
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||||
|
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||||
|
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||||
|
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||||
|
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||||
|
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||||
|
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_freebsd.sh
|
// mksysnum_freebsd.pl
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
package syscall
|
package syscall
|
||||||
@ -317,5 +317,21 @@ const (
|
|||||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||||
|
SYS_CAP_NEW = 514 // { int cap_new(int fd, u_int64_t rights); }
|
||||||
|
SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
|
||||||
|
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||||
|
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||||
|
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||||
|
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||||
|
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||||
|
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||||
|
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||||
|
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||||
|
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||||
|
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||||
|
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||||
|
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||||
|
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||||
|
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||||
)
|
)
|
||||||
|
@ -342,4 +342,10 @@ const (
|
|||||||
SYS_FANOTIFY_INIT = 338
|
SYS_FANOTIFY_INIT = 338
|
||||||
SYS_FANOTIFY_MARK = 339
|
SYS_FANOTIFY_MARK = 339
|
||||||
SYS_PRLIMIT64 = 340
|
SYS_PRLIMIT64 = 340
|
||||||
|
SYS_NAME_TO_HANDLE_AT = 341
|
||||||
|
SYS_OPEN_BY_HANDLE_AT = 342
|
||||||
|
SYS_CLOCK_ADJTIME = 343
|
||||||
|
SYS_SYNCFS = 344
|
||||||
|
SYS_SENDMMSG = 345
|
||||||
|
SYS_SETNS = 346
|
||||||
)
|
)
|
||||||
|
@ -307,4 +307,10 @@ const (
|
|||||||
SYS_FANOTIFY_INIT = 300
|
SYS_FANOTIFY_INIT = 300
|
||||||
SYS_FANOTIFY_MARK = 301
|
SYS_FANOTIFY_MARK = 301
|
||||||
SYS_PRLIMIT64 = 302
|
SYS_PRLIMIT64 = 302
|
||||||
|
SYS_NAME_TO_HANDLE_AT = 303
|
||||||
|
SYS_OPEN_BY_HANDLE_AT = 304
|
||||||
|
SYS_CLOCK_ADJTIME = 305
|
||||||
|
SYS_SYNCFS = 306
|
||||||
|
SYS_SENDMMSG = 307
|
||||||
|
SYS_SETNS = 308
|
||||||
)
|
)
|
||||||
|
@ -299,7 +299,7 @@ const (
|
|||||||
IFLA_LINKINFO = 0x12
|
IFLA_LINKINFO = 0x12
|
||||||
IFLA_NET_NS_PID = 0x13
|
IFLA_NET_NS_PID = 0x13
|
||||||
IFLA_IFALIAS = 0x14
|
IFLA_IFALIAS = 0x14
|
||||||
IFLA_MAX = 0x1a
|
IFLA_MAX = 0x1c
|
||||||
RT_SCOPE_UNIVERSE = 0x0
|
RT_SCOPE_UNIVERSE = 0x0
|
||||||
RT_SCOPE_SITE = 0xc8
|
RT_SCOPE_SITE = 0xc8
|
||||||
RT_SCOPE_LINK = 0xfd
|
RT_SCOPE_LINK = 0xfd
|
||||||
|
@ -301,7 +301,7 @@ const (
|
|||||||
IFLA_LINKINFO = 0x12
|
IFLA_LINKINFO = 0x12
|
||||||
IFLA_NET_NS_PID = 0x13
|
IFLA_NET_NS_PID = 0x13
|
||||||
IFLA_IFALIAS = 0x14
|
IFLA_IFALIAS = 0x14
|
||||||
IFLA_MAX = 0x1a
|
IFLA_MAX = 0x1c
|
||||||
RT_SCOPE_UNIVERSE = 0x0
|
RT_SCOPE_UNIVERSE = 0x0
|
||||||
RT_SCOPE_SITE = 0xc8
|
RT_SCOPE_SITE = 0xc8
|
||||||
RT_SCOPE_LINK = 0xfd
|
RT_SCOPE_LINK = 0xfd
|
||||||
|
Loading…
Reference in New Issue
Block a user