Skip to content

Commit 23e45ab

Browse files
committed
Auto merge of #477 - zethra:master, r=alexcrichton
Added constants from prctl.h I left in the comment from prctl.h I can remove them if you want.
2 parents b42798d + 1887630 commit 23e45ab

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,126 @@ pub const LIO_NOWAIT: ::c_int = 1;
561561
pub const MREMAP_MAYMOVE: ::c_int = 1;
562562
pub const MREMAP_FIXED: ::c_int = 2;
563563

564+
pub const PR_SET_PDEATHSIG: ::c_int = 1;
565+
pub const PR_GET_PDEATHSIG: ::c_int = 2;
566+
567+
pub const PR_GET_DUMPABLE: ::c_int = 3;
568+
pub const PR_SET_DUMPABLE: ::c_int = 4;
569+
570+
pub const PR_GET_UNALIGN: ::c_int = 5;
571+
pub const PR_SET_UNALIGN: ::c_int = 6;
572+
pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
573+
pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
574+
575+
pub const PR_GET_KEEPCAPS: ::c_int = 7;
576+
pub const PR_SET_KEEPCAPS: ::c_int = 8;
577+
578+
pub const PR_GET_FPEMU: ::c_int = 9;
579+
pub const PR_SET_FPEMU: ::c_int = 10;
580+
pub const PR_FPEMU_NOPRINT: ::c_int = 1;
581+
pub const PR_FPEMU_SIGFPE: ::c_int = 2;
582+
583+
pub const PR_GET_FPEXC: ::c_int = 11;
584+
pub const PR_SET_FPEXC: ::c_int = 12;
585+
pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
586+
pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
587+
pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
588+
pub const PR_FP_EXC_UND: ::c_int = 0x040000;
589+
pub const PR_FP_EXC_RES: ::c_int = 0x080000;
590+
pub const PR_FP_EXC_INV: ::c_int = 0x100000;
591+
pub const PR_FP_EXC_DISABLED: ::c_int = 0;
592+
pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
593+
pub const PR_FP_EXC_ASYNC: ::c_int = 2;
594+
pub const PR_FP_EXC_PRECISE: ::c_int = 3;
595+
596+
pub const PR_GET_TIMING: ::c_int = 13;
597+
pub const PR_SET_TIMING: ::c_int = 14;
598+
pub const PR_TIMING_STATISTICAL: ::c_int = 0;
599+
pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
600+
601+
pub const PR_SET_NAME: ::c_int = 15;
602+
pub const PR_GET_NAME: ::c_int = 16;
603+
604+
pub const PR_GET_ENDIAN: ::c_int = 19;
605+
pub const PR_SET_ENDIAN: ::c_int = 20;
606+
pub const PR_ENDIAN_BIG: ::c_int = 0;
607+
pub const PR_ENDIAN_LITTLE: ::c_int = 1;
608+
pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
609+
610+
pub const PR_GET_SECCOMP: ::c_int = 21;
611+
pub const PR_SET_SECCOMP: ::c_int = 22;
612+
613+
pub const PR_CAPBSET_READ: ::c_int = 23;
614+
pub const PR_CAPBSET_DROP: ::c_int = 24;
615+
616+
pub const PR_GET_TSC: ::c_int = 25;
617+
pub const PR_SET_TSC: ::c_int = 26;
618+
pub const PR_TSC_ENABLE: ::c_int = 1;
619+
pub const PR_TSC_SIGSEGV: ::c_int = 2;
620+
621+
pub const PR_GET_SECUREBITS: ::c_int = 27;
622+
pub const PR_SET_SECUREBITS: ::c_int = 28;
623+
624+
pub const PR_SET_TIMERSLACK: ::c_int = 29;
625+
pub const PR_GET_TIMERSLACK: ::c_int = 30;
626+
627+
pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
628+
pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
629+
630+
pub const PR_MCE_KILL: ::c_int = 33;
631+
pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
632+
pub const PR_MCE_KILL_SET: ::c_int = 1;
633+
634+
pub const PR_MCE_KILL_LATE: ::c_int = 0;
635+
pub const PR_MCE_KILL_EARLY: ::c_int = 1;
636+
pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
637+
638+
pub const PR_MCE_KILL_GET: ::c_int = 34;
639+
640+
pub const PR_SET_MM: ::c_int = 35;
641+
pub const PR_SET_MM_START_CODE: ::c_int = 1;
642+
pub const PR_SET_MM_END_CODE: ::c_int = 2;
643+
pub const PR_SET_MM_START_DATA: ::c_int = 3;
644+
pub const PR_SET_MM_END_DATA: ::c_int = 4;
645+
pub const PR_SET_MM_START_STACK: ::c_int = 5;
646+
pub const PR_SET_MM_START_BRK: ::c_int = 6;
647+
pub const PR_SET_MM_BRK: ::c_int = 7;
648+
pub const PR_SET_MM_ARG_START: ::c_int = 8;
649+
pub const PR_SET_MM_ARG_END: ::c_int = 9;
650+
pub const PR_SET_MM_ENV_START: ::c_int = 10;
651+
pub const PR_SET_MM_ENV_END: ::c_int = 11;
652+
pub const PR_SET_MM_AUXV: ::c_int = 12;
653+
pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
654+
pub const PR_SET_MM_MAP: ::c_int = 14;
655+
pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
656+
657+
pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
658+
659+
pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
660+
pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
661+
662+
pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
663+
pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
664+
665+
pub const PR_GET_TID_ADDRESS: ::c_int = 40;
666+
667+
pub const PR_SET_THP_DISABLE: ::c_int = 41;
668+
pub const PR_GET_THP_DISABLE: ::c_int = 42;
669+
670+
pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
671+
pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
672+
673+
pub const PR_SET_FP_MODE: ::c_int = 45;
674+
pub const PR_GET_FP_MODE: ::c_int = 46;
675+
pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
676+
pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
677+
678+
pub const PR_CAP_AMBIENT: ::c_int = 47;
679+
pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
680+
pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
681+
pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
682+
pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
683+
564684
f! {
565685
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
566686
for slot in cpuset.bits.iter_mut() {

0 commit comments

Comments
 (0)