authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2020-11-04 22:39:35+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2020-11-04 22:39:35+11:00
logb42ffbe9e82896c55c68412f99463f54c5e56f21
treed25de4820c2f8acc24d59e4c90e12473a2732239
parentb90fb1e96b2c3edd2fb9e8884e64944692d5dd7f
signaturelock-open Commit is signed but in an unrecognized format.

std: use PR enum as only location of opcode numbers


1 files changed, 50 insertions(+), 50 deletions(-)

lib/std/os/bits/linux/prctl.zig+50-50
...@@ -86,27 +86,27 @@ pub const PR = extern enum(i32) {...@@ -86,27 +86,27 @@ pub const PR = extern enum(i32) {
86 _,86 _,
87};87};
8888
89pub const PR_SET_PDEATHSIG = 1;89pub const PR_SET_PDEATHSIG = @enumToInt(PR.PR_SET_PDEATHSIG);
90pub const PR_GET_PDEATHSIG = 2;90pub const PR_GET_PDEATHSIG = @enumToInt(PR.PR_GET_PDEATHSIG);
9191
92pub const PR_GET_DUMPABLE = 3;92pub const PR_GET_DUMPABLE = @enumToInt(PR.PR_GET_DUMPABLE);
93pub const PR_SET_DUMPABLE = 4;93pub const PR_SET_DUMPABLE = @enumToInt(PR.PR_SET_DUMPABLE);
9494
95pub const PR_GET_UNALIGN = 5;95pub const PR_GET_UNALIGN = @enumToInt(PR.PR_GET_UNALIGN);
96pub const PR_SET_UNALIGN = 6;96pub const PR_SET_UNALIGN = @enumToInt(PR.PR_SET_UNALIGN);
97pub const PR_UNALIGN_NOPRINT = 1;97pub const PR_UNALIGN_NOPRINT = 1;
98pub const PR_UNALIGN_SIGBUS = 2;98pub const PR_UNALIGN_SIGBUS = 2;
9999
100pub const PR_GET_KEEPCAPS = 7;100pub const PR_GET_KEEPCAPS = @enumToInt(PR.PR_GET_KEEPCAPS);
101pub const PR_SET_KEEPCAPS = 8;101pub const PR_SET_KEEPCAPS = @enumToInt(PR.PR_SET_KEEPCAPS);
102102
103pub const PR_GET_FPEMU = 9;103pub const PR_GET_FPEMU = @enumToInt(PR.PR_GET_FPEMU);
104pub const PR_SET_FPEMU = 10;104pub const PR_SET_FPEMU = @enumToInt(PR.PR_SET_FPEMU);
105pub const PR_FPEMU_NOPRINT = 1;105pub const PR_FPEMU_NOPRINT = 1;
106pub const PR_FPEMU_SIGFPE = 2;106pub const PR_FPEMU_SIGFPE = 2;
107107
108pub const PR_GET_FPEXC = 11;108pub const PR_GET_FPEXC = @enumToInt(PR.PR_GET_FPEXC);
109pub const PR_SET_FPEXC = 12;109pub const PR_SET_FPEXC = @enumToInt(PR.PR_SET_FPEXC);
110pub const PR_FP_EXC_SW_ENABLE = 0x80;110pub const PR_FP_EXC_SW_ENABLE = 0x80;
111pub const PR_FP_EXC_DIV = 0x010000;111pub const PR_FP_EXC_DIV = 0x010000;
112pub const PR_FP_EXC_OVF = 0x020000;112pub const PR_FP_EXC_OVF = 0x020000;
...@@ -118,41 +118,41 @@ pub const PR_FP_EXC_NONRECOV = 1;...@@ -118,41 +118,41 @@ pub const PR_FP_EXC_NONRECOV = 1;
118pub const PR_FP_EXC_ASYNC = 2;118pub const PR_FP_EXC_ASYNC = 2;
119pub const PR_FP_EXC_PRECISE = 3;119pub const PR_FP_EXC_PRECISE = 3;
120120
121pub const PR_GET_TIMING = 13;121pub const PR_GET_TIMING = @enumToInt(PR.PR_GET_TIMING);
122pub const PR_SET_TIMING = 14;122pub const PR_SET_TIMING = @enumToInt(PR.PR_SET_TIMING);
123pub const PR_TIMING_STATISTICAL = 0;123pub const PR_TIMING_STATISTICAL = 0;
124pub const PR_TIMING_TIMESTAMP = 1;124pub const PR_TIMING_TIMESTAMP = 1;
125125
126pub const PR_SET_NAME = 15;126pub const PR_SET_NAME = @enumToInt(PR.PR_SET_NAME);
127pub const PR_GET_NAME = 16;127pub const PR_GET_NAME = @enumToInt(PR.PR_GET_NAME);
128128
129pub const PR_GET_ENDIAN = 19;129pub const PR_GET_ENDIAN = @enumToInt(PR.PR_GET_ENDIAN);
130pub const PR_SET_ENDIAN = 20;130pub const PR_SET_ENDIAN = @enumToInt(PR.PR_SET_ENDIAN);
131pub const PR_ENDIAN_BIG = 0;131pub const PR_ENDIAN_BIG = 0;
132pub const PR_ENDIAN_LITTLE = 1;132pub const PR_ENDIAN_LITTLE = 1;
133pub const PR_ENDIAN_PPC_LITTLE = 2;133pub const PR_ENDIAN_PPC_LITTLE = 2;
134134
135pub const PR_GET_SECCOMP = 21;135pub const PR_GET_SECCOMP = @enumToInt(PR.PR_GET_SECCOMP);
136pub const PR_SET_SECCOMP = 22;136pub const PR_SET_SECCOMP = @enumToInt(PR.PR_SET_SECCOMP);
137137
138pub const PR_CAPBSET_READ = 23;138pub const PR_CAPBSET_READ = @enumToInt(PR.PR_CAPBSET_READ);
139pub const PR_CAPBSET_DROP = 24;139pub const PR_CAPBSET_DROP = @enumToInt(PR.PR_CAPBSET_DROP);
140140
141pub const PR_GET_TSC = 25;141pub const PR_GET_TSC = @enumToInt(PR.PR_GET_TSC);
142pub const PR_SET_TSC = 26;142pub const PR_SET_TSC = @enumToInt(PR.PR_SET_TSC);
143pub const PR_TSC_ENABLE = 1;143pub const PR_TSC_ENABLE = 1;
144pub const PR_TSC_SIGSEGV = 2;144pub const PR_TSC_SIGSEGV = 2;
145145
146pub const PR_GET_SECUREBITS = 27;146pub const PR_GET_SECUREBITS = @enumToInt(PR.PR_GET_SECUREBITS);
147pub const PR_SET_SECUREBITS = 28;147pub const PR_SET_SECUREBITS = @enumToInt(PR.PR_SET_SECUREBITS);
148148
149pub const PR_SET_TIMERSLACK = 29;149pub const PR_SET_TIMERSLACK = @enumToInt(PR.PR_SET_TIMERSLACK);
150pub const PR_GET_TIMERSLACK = 30;150pub const PR_GET_TIMERSLACK = @enumToInt(PR.PR_GET_TIMERSLACK);
151151
152pub const PR_TASK_PERF_EVENTS_DISABLE = 31;152pub const PR_TASK_PERF_EVENTS_DISABLE = @enumToInt(PR.PR_TASK_PERF_EVENTS_DISABLE);
153pub const PR_TASK_PERF_EVENTS_ENABLE = 32;153pub const PR_TASK_PERF_EVENTS_ENABLE = @enumToInt(PR.PR_TASK_PERF_EVENTS_ENABLE);
154154
155pub const PR_MCE_KILL = 33;155pub const PR_MCE_KILL = @enumToInt(PR.PR_MCE_KILL);
156pub const PR_MCE_KILL_CLEAR = 0;156pub const PR_MCE_KILL_CLEAR = 0;
157pub const PR_MCE_KILL_SET = 1;157pub const PR_MCE_KILL_SET = 1;
158158
...@@ -160,9 +160,9 @@ pub const PR_MCE_KILL_LATE = 0;...@@ -160,9 +160,9 @@ pub const PR_MCE_KILL_LATE = 0;
160pub const PR_MCE_KILL_EARLY = 1;160pub const PR_MCE_KILL_EARLY = 1;
161pub const PR_MCE_KILL_DEFAULT = 2;161pub const PR_MCE_KILL_DEFAULT = 2;
162162
163pub const PR_MCE_KILL_GET = 34;163pub const PR_MCE_KILL_GET = @enumToInt(PR.PR_MCE_KILL_GET);
164164
165pub const PR_SET_MM = 35;165pub const PR_SET_MM = @enumToInt(PR.PR_SET_MM);
166pub const PR_SET_MM_START_CODE = 1;166pub const PR_SET_MM_START_CODE = 1;
167pub const PR_SET_MM_END_CODE = 2;167pub const PR_SET_MM_END_CODE = 2;
168pub const PR_SET_MM_START_DATA = 3;168pub const PR_SET_MM_START_DATA = 3;
...@@ -196,42 +196,42 @@ pub const prctl_mm_map = extern struct {...@@ -196,42 +196,42 @@ pub const prctl_mm_map = extern struct {
196 exe_fd: u32,196 exe_fd: u32,
197};197};
198198
199pub const PR_SET_PTRACER = 0x59616d61;199pub const PR_SET_PTRACER = @enumToInt(PR.PR_SET_PTRACER);
200pub const PR_SET_PTRACER_ANY = std.math.maxInt(c_ulong);200pub const PR_SET_PTRACER_ANY = std.math.maxInt(c_ulong);
201201
202pub const PR_SET_CHILD_SUBREAPER = 36;202pub const PR_SET_CHILD_SUBREAPER = @enumToInt(PR.PR_SET_CHILD_SUBREAPER);
203pub const PR_GET_CHILD_SUBREAPER = 37;203pub const PR_GET_CHILD_SUBREAPER = @enumToInt(PR.PR_GET_CHILD_SUBREAPER);
204204
205pub const PR_SET_NO_NEW_PRIVS = 38;205pub const PR_SET_NO_NEW_PRIVS = @enumToInt(PR.PR_SET_NO_NEW_PRIVS);
206pub const PR_GET_NO_NEW_PRIVS = 39;206pub const PR_GET_NO_NEW_PRIVS = @enumToInt(PR.PR_GET_NO_NEW_PRIVS);
207207
208pub const PR_GET_TID_ADDRESS = 40;208pub const PR_GET_TID_ADDRESS = @enumToInt(PR.PR_GET_TID_ADDRESS);
209209
210pub const PR_SET_THP_DISABLE = 41;210pub const PR_SET_THP_DISABLE = @enumToInt(PR.PR_SET_THP_DISABLE);
211pub const PR_GET_THP_DISABLE = 42;211pub const PR_GET_THP_DISABLE = @enumToInt(PR.PR_GET_THP_DISABLE);
212212
213pub const PR_MPX_ENABLE_MANAGEMENT = 43;213pub const PR_MPX_ENABLE_MANAGEMENT = @enumToInt(PR.PR_MPX_ENABLE_MANAGEMENT);
214pub const PR_MPX_DISABLE_MANAGEMENT = 44;214pub const PR_MPX_DISABLE_MANAGEMENT = @enumToInt(PR.PR_MPX_DISABLE_MANAGEMENT);
215215
216pub const PR_SET_FP_MODE = 45;216pub const PR_SET_FP_MODE = @enumToInt(PR.PR_SET_FP_MODE);
217pub const PR_GET_FP_MODE = 46;217pub const PR_GET_FP_MODE = @enumToInt(PR.PR_GET_FP_MODE);
218pub const PR_FP_MODE_FR = 1 << 0;218pub const PR_FP_MODE_FR = 1 << 0;
219pub const PR_FP_MODE_FRE = 1 << 1;219pub const PR_FP_MODE_FRE = 1 << 1;
220220
221pub const PR_CAP_AMBIENT = 47;221pub const PR_CAP_AMBIENT = @enumToInt(PR.PR_CAP_AMBIENT);
222pub const PR_CAP_AMBIENT_IS_SET = 1;222pub const PR_CAP_AMBIENT_IS_SET = 1;
223pub const PR_CAP_AMBIENT_RAISE = 2;223pub const PR_CAP_AMBIENT_RAISE = 2;
224pub const PR_CAP_AMBIENT_LOWER = 3;224pub const PR_CAP_AMBIENT_LOWER = 3;
225pub const PR_CAP_AMBIENT_CLEAR_ALL = 4;225pub const PR_CAP_AMBIENT_CLEAR_ALL = 4;
226226
227pub const PR_SVE_SET_VL = 50;227pub const PR_SVE_SET_VL = @enumToInt(PR.PR_SVE_SET_VL);
228pub const PR_SVE_SET_VL_ONEXEC = 1 << 18;228pub const PR_SVE_SET_VL_ONEXEC = 1 << 18;
229pub const PR_SVE_GET_VL = 51;229pub const PR_SVE_GET_VL = @enumToInt(PR.PR_SVE_GET_VL);
230pub const PR_SVE_VL_LEN_MASK = 0xffff;230pub const PR_SVE_VL_LEN_MASK = 0xffff;
231pub const PR_SVE_VL_INHERIT = 1 << 17;231pub const PR_SVE_VL_INHERIT = 1 << 17;
232232
233pub const PR_GET_SPECULATION_CTRL = 52;233pub const PR_GET_SPECULATION_CTRL = @enumToInt(PR.PR_GET_SPECULATION_CTRL);
234pub const PR_SET_SPECULATION_CTRL = 53;234pub const PR_SET_SPECULATION_CTRL = @enumToInt(PR.PR_SET_SPECULATION_CTRL);
235pub const PR_SPEC_STORE_BYPASS = 0;235pub const PR_SPEC_STORE_BYPASS = 0;
236pub const PR_SPEC_NOT_AFFECTED = 0;236pub const PR_SPEC_NOT_AFFECTED = 0;
237pub const PR_SPEC_PRCTL = 1 << 0;237pub const PR_SPEC_PRCTL = 1 << 0;