diff options
author | David Carlier <devnexen@gmail.com> | 2022-02-12 20:56:56 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2022-02-12 20:56:56 +0000 |
commit | b2c33f79f424b95a547522d99d7a6d12be2cdf3c (patch) | |
tree | be85cae3fb5cb9d12211d39ed67961c42b30851d /src/unix/solarish/mod.rs | |
parent | f856aa6121930c9aea431b174bb9d850a55848c6 (diff) | |
download | rust-libc-b2c33f79f424b95a547522d99d7a6d12be2cdf3c.tar.gz |
processor_info for solarish
Diffstat (limited to 'src/unix/solarish/mod.rs')
-rw-r--r-- | src/unix/solarish/mod.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 66de32f7b3..3412f897e9 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -27,6 +27,7 @@ pub type projid_t = ::c_int; pub type zoneid_t = ::c_int; pub type psetid_t = ::c_int; pub type processorid_t = ::c_int; +pub type chipid_t = ::c_int; pub type suseconds_t = ::c_long; pub type off_t = ::c_long; @@ -451,6 +452,13 @@ s! { pub lgrp: ::lgrp_id_t, pub aff: ::lgrp_affinity_t, } + + pub struct processor_info_t { + pub pi_state: ::c_int, + pub pi_processor_type: [::c_char; PI_TYPELEN as usize], + pub pi_fputypes: [::c_char; PI_FPUTYPE as usize], + pub pi_clock: ::c_int, + } } s_no_extra_traits! { @@ -2343,6 +2351,20 @@ pub const LGRP_MEM_SZ_INSTALLED: ::lgrp_mem_size_flag_t = 1; pub const LGRP_VIEW_CALLER: ::lgrp_view_t = 0; pub const LGRP_VIEW_OS: ::lgrp_view_t = 1; +// sys/processor.h + +pub const P_OFFLINE: ::c_int = 0x001; +pub const P_ONLINE: ::c_int = 0x002; +pub const P_STATUS: ::c_int = 0x003; +pub const P_FAULTED: ::c_int = 0x004; +pub const P_POWEROFF: ::c_int = 0x005; +pub const P_NOINTR: ::c_int = 0x006; +pub const P_SPARE: ::c_int = 0x007; +pub const P_DISABLED: ::c_int = 0x008; +pub const P_FORCED: ::c_int = 0x10000000; +pub const PI_TYPELEN: ::c_int = 16; +pub const PI_FPUTYPE: ::c_int = 32; + // As per sys/socket.h, header alignment must be 8 bytes on SPARC // and 4 bytes everywhere else: #[cfg(target_arch = "sparc64")] @@ -2910,6 +2932,7 @@ extern "C" { old_binding: *mut processorid_t, ) -> ::c_int; pub fn p_online(processorid: ::processorid_t, flag: ::c_int) -> ::c_int; + pub fn processor_info(processorid: ::processorid_t, infop: *mut processor_info_t) -> ::c_int; pub fn getexecname() -> *const ::c_char; |