| ... | ... | @@ -6817,53 +6817,166 @@ pub const ifreq = extern struct { |
| 6817 | 6817 | }; |
| 6818 | 6818 | |
| 6819 | 6819 | // doc comments copied from musl |
| 6820 | | pub const rlimit_resource = if (native_arch.isMIPS() or native_arch.isSPARC()) |
| 6821 | | arch_bits.rlimit_resource |
| 6822 | | else |
| 6823 | | enum(c_int) { |
| 6824 | | /// Per-process CPU limit, in seconds. |
| 6825 | | CPU, |
| 6826 | | /// Largest file that can be created, in bytes. |
| 6827 | | FSIZE, |
| 6828 | | /// Maximum size of data segment, in bytes. |
| 6829 | | DATA, |
| 6830 | | /// Maximum size of stack segment, in bytes. |
| 6831 | | STACK, |
| 6832 | | /// Largest core file that can be created, in bytes. |
| 6833 | | CORE, |
| 6834 | | /// Largest resident set size, in bytes. |
| 6835 | | /// This affects swapping; processes that are exceeding their |
| 6836 | | /// resident set size will be more likely to have physical memory |
| 6837 | | /// taken from them. |
| 6838 | | RSS, |
| 6839 | | /// Number of processes. |
| 6840 | | NPROC, |
| 6841 | | /// Number of open files. |
| 6842 | | NOFILE, |
| 6843 | | /// Locked-in-memory address space. |
| 6844 | | MEMLOCK, |
| 6845 | | /// Address space limit. |
| 6846 | | AS, |
| 6847 | | /// Maximum number of file locks. |
| 6848 | | LOCKS, |
| 6849 | | /// Maximum number of pending signals. |
| 6850 | | SIGPENDING, |
| 6851 | | /// Maximum bytes in POSIX message queues. |
| 6852 | | MSGQUEUE, |
| 6853 | | /// Maximum nice priority allowed to raise to. |
| 6854 | | /// Nice levels 19 .. -20 correspond to 0 .. 39 |
| 6855 | | /// values of this resource limit. |
| 6856 | | NICE, |
| 6857 | | /// Maximum realtime priority allowed for non-privileged |
| 6858 | | /// processes. |
| 6859 | | RTPRIO, |
| 6860 | | /// Maximum CPU time in µs that a process scheduled under a real-time |
| 6861 | | /// scheduling policy may consume without making a blocking system |
| 6862 | | /// call before being forcibly descheduled. |
| 6863 | | RTTIME, |
| 6820 | pub const rlimit_resource = if (native_arch.isMIPS()) enum(c_int) { |
| 6821 | /// Per-process CPU limit, in seconds. |
| 6822 | CPU = 0, |
| 6864 | 6823 | |
| 6865 | | _, |
| 6866 | | }; |
| 6824 | /// Largest file that can be created, in bytes. |
| 6825 | FSIZE = 1, |
| 6826 | |
| 6827 | /// Maximum size of data segment, in bytes. |
| 6828 | DATA = 2, |
| 6829 | |
| 6830 | /// Maximum size of stack segment, in bytes. |
| 6831 | STACK = 3, |
| 6832 | |
| 6833 | /// Largest core file that can be created, in bytes. |
| 6834 | CORE = 4, |
| 6835 | |
| 6836 | /// Number of open files. |
| 6837 | NOFILE = 5, |
| 6838 | |
| 6839 | /// Address space limit. |
| 6840 | AS = 6, |
| 6841 | |
| 6842 | /// Largest resident set size, in bytes. |
| 6843 | /// This affects swapping; processes that are exceeding their |
| 6844 | /// resident set size will be more likely to have physical memory |
| 6845 | /// taken from them. |
| 6846 | RSS = 7, |
| 6847 | |
| 6848 | /// Number of processes. |
| 6849 | NPROC = 8, |
| 6850 | |
| 6851 | /// Locked-in-memory address space. |
| 6852 | MEMLOCK = 9, |
| 6853 | |
| 6854 | /// Maximum number of file locks. |
| 6855 | LOCKS = 10, |
| 6856 | |
| 6857 | /// Maximum number of pending signals. |
| 6858 | SIGPENDING = 11, |
| 6859 | |
| 6860 | /// Maximum bytes in POSIX message queues. |
| 6861 | MSGQUEUE = 12, |
| 6862 | |
| 6863 | /// Maximum nice priority allowed to raise to. |
| 6864 | /// Nice levels 19 .. -20 correspond to 0 .. 39 |
| 6865 | /// values of this resource limit. |
| 6866 | NICE = 13, |
| 6867 | |
| 6868 | /// Maximum realtime priority allowed for non-privileged |
| 6869 | /// processes. |
| 6870 | RTPRIO = 14, |
| 6871 | |
| 6872 | /// Maximum CPU time in µs that a process scheduled under a real-time |
| 6873 | /// scheduling policy may consume without making a blocking system |
| 6874 | /// call before being forcibly descheduled. |
| 6875 | RTTIME = 15, |
| 6876 | |
| 6877 | _, |
| 6878 | } else if (native_arch.isSPARC()) enum(c_int) { |
| 6879 | /// Per-process CPU limit, in seconds. |
| 6880 | CPU = 0, |
| 6881 | |
| 6882 | /// Largest file that can be created, in bytes. |
| 6883 | FSIZE = 1, |
| 6884 | |
| 6885 | /// Maximum size of data segment, in bytes. |
| 6886 | DATA = 2, |
| 6887 | |
| 6888 | /// Maximum size of stack segment, in bytes. |
| 6889 | STACK = 3, |
| 6890 | |
| 6891 | /// Largest core file that can be created, in bytes. |
| 6892 | CORE = 4, |
| 6893 | |
| 6894 | /// Largest resident set size, in bytes. |
| 6895 | /// This affects swapping; processes that are exceeding their |
| 6896 | /// resident set size will be more likely to have physical memory |
| 6897 | /// taken from them. |
| 6898 | RSS = 5, |
| 6899 | |
| 6900 | /// Number of open files. |
| 6901 | NOFILE = 6, |
| 6902 | |
| 6903 | /// Number of processes. |
| 6904 | NPROC = 7, |
| 6905 | |
| 6906 | /// Locked-in-memory address space. |
| 6907 | MEMLOCK = 8, |
| 6908 | |
| 6909 | /// Address space limit. |
| 6910 | AS = 9, |
| 6911 | |
| 6912 | /// Maximum number of file locks. |
| 6913 | LOCKS = 10, |
| 6914 | |
| 6915 | /// Maximum number of pending signals. |
| 6916 | SIGPENDING = 11, |
| 6917 | |
| 6918 | /// Maximum bytes in POSIX message queues. |
| 6919 | MSGQUEUE = 12, |
| 6920 | |
| 6921 | /// Maximum nice priority allowed to raise to. |
| 6922 | /// Nice levels 19 .. -20 correspond to 0 .. 39 |
| 6923 | /// values of this resource limit. |
| 6924 | NICE = 13, |
| 6925 | |
| 6926 | /// Maximum realtime priority allowed for non-privileged |
| 6927 | /// processes. |
| 6928 | RTPRIO = 14, |
| 6929 | |
| 6930 | /// Maximum CPU time in µs that a process scheduled under a real-time |
| 6931 | /// scheduling policy may consume without making a blocking system |
| 6932 | /// call before being forcibly descheduled. |
| 6933 | RTTIME = 15, |
| 6934 | |
| 6935 | _, |
| 6936 | } else enum(c_int) { |
| 6937 | /// Per-process CPU limit, in seconds. |
| 6938 | CPU = 0, |
| 6939 | /// Largest file that can be created, in bytes. |
| 6940 | FSIZE = 1, |
| 6941 | /// Maximum size of data segment, in bytes. |
| 6942 | DATA = 2, |
| 6943 | /// Maximum size of stack segment, in bytes. |
| 6944 | STACK = 3, |
| 6945 | /// Largest core file that can be created, in bytes. |
| 6946 | CORE = 4, |
| 6947 | /// Largest resident set size, in bytes. |
| 6948 | /// This affects swapping; processes that are exceeding their |
| 6949 | /// resident set size will be more likely to have physical memory |
| 6950 | /// taken from them. |
| 6951 | RSS = 5, |
| 6952 | /// Number of processes. |
| 6953 | NPROC = 6, |
| 6954 | /// Number of open files. |
| 6955 | NOFILE = 7, |
| 6956 | /// Locked-in-memory address space. |
| 6957 | MEMLOCK = 8, |
| 6958 | /// Address space limit. |
| 6959 | AS = 9, |
| 6960 | /// Maximum number of file locks. |
| 6961 | LOCKS = 10, |
| 6962 | /// Maximum number of pending signals. |
| 6963 | SIGPENDING = 11, |
| 6964 | /// Maximum bytes in POSIX message queues. |
| 6965 | MSGQUEUE = 12, |
| 6966 | /// Maximum nice priority allowed to raise to. |
| 6967 | /// Nice levels 19 .. -20 correspond to 0 .. 39 |
| 6968 | /// values of this resource limit. |
| 6969 | NICE = 13, |
| 6970 | /// Maximum realtime priority allowed for non-privileged |
| 6971 | /// processes. |
| 6972 | RTPRIO = 14, |
| 6973 | /// Maximum CPU time in µs that a process scheduled under a real-time |
| 6974 | /// scheduling policy may consume without making a blocking system |
| 6975 | /// call before being forcibly descheduled. |
| 6976 | RTTIME = 15, |
| 6977 | |
| 6978 | _, |
| 6979 | }; |
| 6867 | 6980 | |
| 6868 | 6981 | pub const rlim_t = u64; |
| 6869 | 6982 | |