Home
last modified time | relevance | path

Searched refs:from_raw (Results 1 - 25 of 61) sorted by relevance

123

/third_party/rust/crates/nix/test/
H A Dtest_sched.rs7 let initial_affinity = sched_getaffinity(Pid::from_raw(0)).unwrap(); in test_sched_affinity()
21 sched_setaffinity(Pid::from_raw(0), &new_affinity).unwrap(); in test_sched_affinity()
24 let updated_affinity = sched_getaffinity(Pid::from_raw(0)).unwrap(); in test_sched_affinity()
38 sched_setaffinity(Pid::from_raw(0), &initial_affinity).unwrap(); in test_sched_affinity()
/third_party/rust/crates/nix/src/
H A Difaddrs.rs80 SockaddrStorage::from_raw(dst_sock_ptr, None) in workaround_xnu_bug()
87 let address = unsafe { SockaddrStorage::from_raw(info.ifa_addr, None) }; in from_libc_ifaddrs()
92 unsafe { SockaddrStorage::from_raw(info.ifa_netmask, None) }; in from_libc_ifaddrs()
104 addr.destination = unsafe { SockaddrStorage::from_raw(ifu, None) }; in from_libc_ifaddrs()
106 addr.broadcast = unsafe { SockaddrStorage::from_raw(ifu, None) }; in from_libc_ifaddrs()
H A Dtime.rs24 pub const fn from_raw(clk_id: clockid_t) -> Self {
213 ClockId::from_raw(clk_id) in from()
/third_party/rust/crates/rustix/src/process/
H A Did.rs61 pub const unsafe fn from_raw(raw: RawUid) -> Self {
88 pub const unsafe fn from_raw(raw: RawGid) -> Self {
118 pub const unsafe fn from_raw(raw: RawPid) -> Option<Self> {
175 pub const unsafe fn from_raw(raw: RawCpuid) -> Self {
H A Dprocctl.rs87 unsafe { procctl_get_optional::<c_int>(PROC_PDEATHSIG_STATUS, None) }.map(Signal::from_raw) in parent_process_death_signal()
176 let pid = unsafe { Pid::from_raw(pid as RawPid) }.ok_or(io::Errno::RANGE)?; in trace_status()
/third_party/rust/crates/nix/test/sys/
H A Dtest_wait.rs99 let pid = Pid::from_raw(1); in test_waitstatus_from_raw()
101 WaitStatus::from_raw(pid, 0x0002), in test_waitstatus_from_raw()
105 WaitStatus::from_raw(pid, 0x0200), in test_waitstatus_from_raw()
108 assert_eq!(WaitStatus::from_raw(pid, 0x7f7f), Err(Errno::EINVAL)); in test_waitstatus_from_raw()
H A Dtest_sockopt.rs27 assert_eq!(Uid::from_raw(xucred.uid()), Uid::current()); in test_local_peercred_seqpacket()
28 assert_eq!(Gid::from_raw(xucred.groups()[0]), Gid::current()); in test_local_peercred_seqpacket()
53 assert_eq!(Uid::from_raw(xucred.uid()), Uid::current()); in test_local_peercred_stream()
54 assert_eq!(Gid::from_raw(xucred.groups()[0]), Gid::current()); in test_local_peercred_stream()
/third_party/rust/crates/nix/src/sys/
H A Dwait.rs208 /// let pid = nix::unistd::Pid::from_raw(1);
209 /// let status = WaitStatus::from_raw(pid, 0x0002);
212 pub fn from_raw(pid: Pid, status: i32) -> Result<WaitStatus> { in from_raw() functions
269 let pid = Pid::from_raw(si_pid); in from_siginfo()
320 pid.into().unwrap_or_else(|| Pid::from_raw(-1)).into(), in waitpid()
328 res => WaitStatus::from_raw(Pid::from_raw(res), status), in waitpid()
/third_party/rust/crates/rust-openssl/openssl/src/
H A Docsp.rs50 pub fn from_raw(raw: c_int) -> OcspResponseStatus { in from_raw() functions
68 pub fn from_raw(raw: c_int) -> OcspCertStatus { in from_raw() functions
100 pub fn from_raw(raw: c_int) -> OcspRevokedStatus { in from_raw() functions
H A Dsrtp.rs25 SrtpProfileId::from_raw(unsafe { (*self.as_ptr()).id }) in id()
57 pub fn from_raw(value: c_ulong) -> SrtpProfileId { in from_raw() functions
H A Dex_data.rs24 pub unsafe fn from_raw(idx: c_int) -> Index<T, U> { in from_raw() functions
H A Dpkey.rs106 pub fn from_raw(value: c_int) -> Id { in from_raw() functions
197 unsafe { Id::from_raw(ffi::EVP_PKEY_id(self.as_ptr())) } in id()
1083 let from_raw = PKey::public_key_from_raw_bytes(&raw, key_type).unwrap(); in test_raw_public_key()
1088 from_raw.public_key_to_der().unwrap() in test_raw_public_key()
1099 let from_raw = PKey::private_key_from_raw_bytes(&raw, key_type).unwrap(); in test_raw_private_key()
1104 from_raw.private_key_to_pkcs8().unwrap() in test_raw_private_key()
H A Dmd.rs233 unsafe { Nid::from_raw(ffi::EVP_MD_type(self.as_ptr())) } in type_()
H A Dencrypt.rs106 .map(|_| Padding::from_raw(pad)) in rsa_padding()
310 .map(|_| Padding::from_raw(pad)) in rsa_padding()
/third_party/rust/crates/rustix/src/backend/linux_raw/net/
H A Dtypes.rs34 pub const fn from_raw(raw: RawSocketType) -> Self {
131 pub const fn from_raw(raw: RawAddressFamily) -> Self {
218 pub const fn from_raw(raw: RawProtocol) -> Self {
/third_party/rust/crates/regex/regex-capi/src/
H A Drure.rs154 unsafe { drop(Box::from_raw(re as *mut Regex)); } in rure_free()
261 drop(CString::from_raw(ptr)); in rure_iter_capture_names_free()
263 drop(Box::from_raw(it)); in rure_iter_capture_names_free()
319 unsafe { drop(Box::from_raw(it)); } in rure_iter_free()
410 unsafe { drop(Box::from_raw(captures as *mut Captures)); } in rure_captures_free()
450 unsafe { drop(Box::from_raw(options)); } in rure_options_free()
530 unsafe { drop(Box::from_raw(re as *mut RegexSet)); } in rure_set_free()
627 unsafe { drop(CString::from_raw(s)); } in rure_cstring_free()
/third_party/rust/crates/rust-openssl/openssl/src/x509/
H A Dmod.rs79 unsafe { cvt_n(ffi::SSL_get_ex_data_X509_STORE_CTX_idx()).map(|idx| Index::from_raw(idx)) } in ssl_idx()
109 unsafe { X509VerifyResult::from_raw(ffi::X509_STORE_CTX_get_error(self.as_ptr())) } in error()
619 X509VerifyResult::from_raw(r) in issued()
1625 pub const fn from_raw(value: c_int) -> Self {
1732 const NID: Nid = Nid::from_raw(ffi::NID_crl_reason);
1744 const NID: Nid = Nid::from_raw(ffi::NID_certificate_issuer);
1948 pub unsafe fn from_raw(err: c_int) -> X509VerifyResult { in from_raw() functions
2462 pub fn from_raw(id: c_int) -> Self { in from_raw() functions
2530 X509PurposeId::from_raw((*x509_purpose).purpose) in purpose()
/third_party/rust/crates/rustix/tests/process/
H A Dwait.rs20 let pid = unsafe { process::Pid::from_raw(child.id() as _) }; in test_waitpid()
/third_party/rust/crates/rustix/src/backend/libc/net/
H A Dtypes.rs35 pub const fn from_raw(raw: RawSocketType) -> Self {
429 pub const fn from_raw(raw: RawAddressFamily) -> Self {
618 pub const fn from_raw(raw: RawProtocol) -> Self {
/third_party/rust/crates/libloading/src/
H A Dsafe.rs148 self.0.get(symbol).map(|from| Symbol::from_raw(from, self)) in get()
242 /// let symbol = Symbol::from_raw(symbol, &lib);
245 pub unsafe fn from_raw<L>(sym: imp::Symbol<T>, library: &'lib L) -> Symbol<'lib, T> { in from_raw() functions
/third_party/python/Tools/c-analyzer/c_parser/parser/
H A D__init__.py129 yield ParsedItem.from_raw(result)
/third_party/rust/crates/cxx/src/
H A Dresult.rs65 what: Box::from_raw(s), in exception()
/third_party/python/Tools/c-analyzer/c_analyzer/
H A Dinfo.py42 def from_raw(cls, raw, **extra): member in Analyzed
278 return cls._item_class.from_raw(info, **extra)
/third_party/rust/crates/rust-openssl/openssl/src/ssl/
H A Derror.rs41 pub fn from_raw(raw: c_int) -> ErrorCode { in from_raw() functions
/third_party/rust/crates/nix/src/sys/ptrace/
H A Dbsd.rs84 ptrace_other(Request::PT_TRACE_ME, Pid::from_raw(0), ptr::null_mut(), 0) in traceme()
152 /// match waitpid(Pid::from_raw(-1), None) {

Completed in 15 milliseconds

123