Skip to content

Commit

Permalink
feat: move NT_XXX constants defined in elf.h to linux/mod.rs (#3938)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored Oct 1, 2024
1 parent 2191c87 commit 4ce03da
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
17 changes: 0 additions & 17 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,23 +337,6 @@ NFT_USERDATA_MAXLEN
NF_NETDEV_INGRESS
NF_NETDEV_NUMHOOKS
NILFS_SUPER_MAGIC
NT_PRSTATUS
NT_PRFPREG
NT_FPREGSET
NT_PRPSINFO
NT_PRXREG
NT_TASKSTRUCT
NT_PLATFORM
NT_AUXV
NT_GWINDOWS
NT_ASRS
NT_PSTATUS
NT_PSINFO
NT_PRCRED
NT_UTSNAME
NT_LWPSTATUS
NT_LWPSINFO
NT_PRFPXREG
NTF_EXT_LEARNED
NTF_MASTER
NTF_OFFLOADED
Expand Down
17 changes: 17 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4008,3 +4008,20 @@ eventfd_write
__c_anonymous_ifru_map
__c_anonymous_ifr_ifru
__c_anonymous_ifc_ifcu
NT_PRSTATUS
NT_PRFPREG
NT_FPREGSET
NT_PRPSINFO
NT_PRXREG
NT_TASKSTRUCT
NT_PLATFORM
NT_AUXV
NT_GWINDOWS
NT_ASRS
NT_PSTATUS
NT_PSINFO
NT_PRCRED
NT_UTSNAME
NT_LWPSTATUS
NT_LWPSINFO
NT_PRFPXREG
19 changes: 0 additions & 19 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,25 +1094,6 @@ pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_O

pub const XDP_PKT_CONTD: ::__u32 = 1 << 0;

// elf.h
pub const NT_PRSTATUS: ::c_int = 1;
pub const NT_PRFPREG: ::c_int = 2;
pub const NT_FPREGSET: ::c_int = 2;
pub const NT_PRPSINFO: ::c_int = 3;
pub const NT_PRXREG: ::c_int = 4;
pub const NT_TASKSTRUCT: ::c_int = 4;
pub const NT_PLATFORM: ::c_int = 5;
pub const NT_AUXV: ::c_int = 6;
pub const NT_GWINDOWS: ::c_int = 7;
pub const NT_ASRS: ::c_int = 8;
pub const NT_PSTATUS: ::c_int = 10;
pub const NT_PSINFO: ::c_int = 13;
pub const NT_PRCRED: ::c_int = 14;
pub const NT_UTSNAME: ::c_int = 15;
pub const NT_LWPSTATUS: ::c_int = 16;
pub const NT_LWPSINFO: ::c_int = 17;
pub const NT_PRFPXREG: ::c_int = 20;

pub const ELFOSABI_ARM_AEABI: u8 = 64;

// linux/sched.h
Expand Down
19 changes: 19 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5133,6 +5133,25 @@ pub const SCHED_FLAG_KEEP_PARAMS: ::c_int = 0x10;
pub const SCHED_FLAG_UTIL_CLAMP_MIN: ::c_int = 0x20;
pub const SCHED_FLAG_UTIL_CLAMP_MAX: ::c_int = 0x40;

// elf.h
pub const NT_PRSTATUS: ::c_int = 1;
pub const NT_PRFPREG: ::c_int = 2;
pub const NT_FPREGSET: ::c_int = 2;
pub const NT_PRPSINFO: ::c_int = 3;
pub const NT_PRXREG: ::c_int = 4;
pub const NT_TASKSTRUCT: ::c_int = 4;
pub const NT_PLATFORM: ::c_int = 5;
pub const NT_AUXV: ::c_int = 6;
pub const NT_GWINDOWS: ::c_int = 7;
pub const NT_ASRS: ::c_int = 8;
pub const NT_PSTATUS: ::c_int = 10;
pub const NT_PSINFO: ::c_int = 13;
pub const NT_PRCRED: ::c_int = 14;
pub const NT_UTSNAME: ::c_int = 15;
pub const NT_LWPSTATUS: ::c_int = 16;
pub const NT_LWPSINFO: ::c_int = 17;
pub const NT_PRFPXREG: ::c_int = 20;

pub const SCHED_FLAG_KEEP_ALL: ::c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS;

pub const SCHED_FLAG_UTIL_CLAMP: ::c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX;
Expand Down

0 comments on commit 4ce03da

Please sign in to comment.