use ::libc::pthread_t;
use ::mach::kern_return::kern_return_t;
use ::mach::mach_types::thread_t;
use ::mach::message::mach_msg_type_number_t;
use ::mach::port::mach_port_t;
use ::mach::vm_types::integer_t;
use ::mach::vm_types::natural_t;
use ::std::mem::size_of;
pub(crate) type thread_policy_flavor_t = natural_t;
pub(crate) type thread_policy_t = *mut integer_t;
pub(crate) const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = size_of::<thread_affinity_policy_data_t>() as mach_msg_type_number_t / size_of::<integer_t>() as mach_msg_type_number_t;
pub(crate) const THREAD_AFFINITY_POLICY: thread_policy_flavor_t = 4;
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(C)]
pub(crate) struct thread_affinity_policy_data_t
{
pub(crate) affinity_tag: integer_t,
}
#[link(name = "System", kind = "framework")]
extern "C"
{
pub(crate) fn thread_policy_set(thread: thread_t, flavor: thread_policy_flavor_t, policy_info: thread_policy_t, count: mach_msg_type_number_t) -> kern_return_t;
}
#[link(name = "c")]
extern "C"
{
pub(crate) fn pthread_mach_thread_np(t: pthread_t) -> mach_port_t;
}