Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,12 @@ pub const MNT_NOWAIT: c_int = 2;

// <mach/thread_policy.h>
pub const THREAD_STANDARD_POLICY: c_int = 1;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_STANDARD_POLICY_COUNT: c_int = 0;
pub const THREAD_EXTENDED_POLICY: c_int = 1;
pub const THREAD_TIME_CONSTRAINT_POLICY: c_int = 2;
Expand Down Expand Up @@ -3795,6 +3801,12 @@ pub const VM_PAGE_QUERY_PAGE_CS_NX: i32 = 0x400;

// mach/task_info.h
pub const TASK_THREAD_TIMES_INFO: u32 = 3;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const HOST_CPU_LOAD_INFO_COUNT: u32 = 4;
pub const MACH_TASK_BASIC_INFO: u32 = 20;

Expand Down Expand Up @@ -3858,6 +3870,12 @@ pub const COPYFILE_STATE_DST_BSIZE: c_int = 12;
pub const COPYFILE_STATE_BSIZE: c_int = 13;

// <sys/attr.h>
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const ATTR_BIT_MAP_COUNT: c_ushort = 5;
pub const FSOPT_NOFOLLOW: u32 = 0x1;
pub const FSOPT_NOFOLLOW_ANY: u32 = 0x800;
Expand Down Expand Up @@ -4029,36 +4047,114 @@ const fn __DARWIN_ALIGN32(p: usize) -> usize {
(p + __DARWIN_ALIGNBYTES32) & !__DARWIN_ALIGNBYTES32
}

#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_extended_policy_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_time_constraint_policy_data_t>() / size_of::<integer_t>())
as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_precedence_policy_data_t>() / size_of::<integer_t>())
as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_affinity_policy_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_background_policy_data_t>() / size_of::<integer_t>())
as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_latency_qos_policy_data_t>() / size_of::<integer_t>())
as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t =
(size_of::<thread_throughput_qos_policy_data_t>() / size_of::<integer_t>())
as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t =
(size_of::<thread_basic_info_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t =
(size_of::<thread_identifier_info_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t =
(size_of::<thread_extended_info_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;

#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const TASK_THREAD_TIMES_INFO_COUNT: u32 =
(size_of::<task_thread_times_info_data_t>() / size_of::<natural_t>()) as u32;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const MACH_TASK_BASIC_INFO_COUNT: u32 =
(size_of::<mach_task_basic_info_data_t>() / size_of::<natural_t>()) as u32;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t =
(size_of::<vm_statistics64_data_t>() / size_of::<integer_t>()) as mach_msg_type_number_t;

Expand Down
6 changes: 6 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,12 @@ pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8;
pub const NFNL_SUBSYS_CTHELPER: c_int = 9;
pub const NFNL_SUBSYS_NFTABLES: c_int = 10;
pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const NFNL_SUBSYS_COUNT: c_int = 12;

pub const NFNL_MSG_BATCH_BEGIN: c_int = NLMSG_MIN_TYPE;
Expand Down
6 changes: 6 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,12 @@ pub const NFNL_SUBSYS_CTHELPER: c_int = 9;
pub const NFNL_SUBSYS_NFTABLES: c_int = 10;
pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11;
pub const NFNL_SUBSYS_HOOK: c_int = 12;
#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const NFNL_SUBSYS_COUNT: c_int = 13;

pub const NFNL_MSG_BATCH_BEGIN: c_int = crate::NLMSG_MIN_TYPE;
Expand Down
6 changes: 6 additions & 0 deletions src/unix/solarish/illumos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ pub const PRIV_USER: c_uint = PRIV_DEBUG
| PRIV_AWARE_RESET
| PRIV_PFEXEC;

#[deprecated(
since = "0.2.187",
note = "This constant, among others often used in C for the purposes of denoting the latest \
value or limit in a set of constants, has been deprecated. See #3131 for details and \
discussion."
)]
pub const LGRP_RSRC_COUNT: crate::lgrp_rsrc_t = 2;
pub const LGRP_RSRC_CPU: crate::lgrp_rsrc_t = 0;
pub const LGRP_RSRC_MEM: crate::lgrp_rsrc_t = 1;
Expand Down
Loading