Home
last modified time | relevance | path

Searched refs:from_raw (Results 1 – 25 of 69) sorted by relevance

123

/third_party/rust/crates/nix/test/
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/
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()
Dtime.rs24 pub const fn from_raw(clk_id: clockid_t) -> Self { in from_raw() method
213 ClockId::from_raw(clk_id) in from()
/third_party/rust/crates/rustix/src/process/
Did.rs61 pub const unsafe fn from_raw(raw: RawUid) -> Self { in from_raw() method
88 pub const unsafe fn from_raw(raw: RawGid) -> Self { in from_raw() method
118 pub const unsafe fn from_raw(raw: RawPid) -> Option<Self> { in from_raw() method
175 pub const unsafe fn from_raw(raw: RawCpuid) -> Self { in from_raw() method
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/rustix/src/backend/linux_raw/process/
Dsyscalls.rs99 Pid::from_raw(ppid as u32) in getppid()
140 Gid::from_raw(gid as u32) in getgid()
145 Gid::from_raw(gid as u32) in getgid()
155 Gid::from_raw(gid as u32) in getegid()
160 Gid::from_raw(gid as u32) in getegid()
169 Uid::from_raw(uid) in getuid()
174 Uid::from_raw(uid as u32) in getuid()
184 Uid::from_raw(uid as u32) in geteuid()
189 Uid::from_raw(uid as u32) in geteuid()
/third_party/rust/crates/regex/regex-capi/src/
Drure.rs154 unsafe { drop(Box::from_raw(re as *mut Regex)); }
261 drop(CString::from_raw(ptr));
263 drop(Box::from_raw(it));
319 unsafe { drop(Box::from_raw(it)); }
410 unsafe { drop(Box::from_raw(captures as *mut Captures)); }
450 unsafe { drop(Box::from_raw(options)); }
530 unsafe { drop(Box::from_raw(re as *mut RegexSet)); }
627 unsafe { drop(CString::from_raw(s)); }
Derror.rs57 unsafe { drop(Box::from_raw(err)); }
/third_party/rust/crates/nix/src/sys/
Dwait.rs212 pub fn from_raw(pid: Pid, status: i32) -> Result<WaitStatus> { in from_raw() method
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/nix/test/sys/
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()
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/rust-openssl/openssl/src/
Dsrtp.rs25 SrtpProfileId::from_raw(unsafe { (*self.as_ptr()).id }) in id()
57 pub fn from_raw(value: c_ulong) -> SrtpProfileId { in from_raw() method
Docsp.rs50 pub fn from_raw(raw: c_int) -> OcspResponseStatus { in from_raw() method
68 pub fn from_raw(raw: c_int) -> OcspCertStatus { in from_raw() method
100 pub fn from_raw(raw: c_int) -> OcspRevokedStatus { in from_raw() method
Dex_data.rs24 pub unsafe fn from_raw(idx: c_int) -> Index<T, U> { in from_raw() method
Dpkey.rs106 pub fn from_raw(value: c_int) -> Id { in from_raw() method
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() localVariable
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() localVariable
1104 from_raw.private_key_to_pkcs8().unwrap() in test_raw_private_key()
/third_party/rust/crates/rustix/src/backend/linux_raw/net/
Dtypes.rs34 pub const fn from_raw(raw: RawSocketType) -> Self { in from_raw() method
131 pub const fn from_raw(raw: RawAddressFamily) -> Self { in from_raw() method
218 pub const fn from_raw(raw: RawProtocol) -> Self { in from_raw() method
/third_party/rust/crates/nix/src/sys/socket/
Daddr.rs1010 unsafe fn from_raw( in from_raw() method
1129 unsafe fn from_raw( in from_raw() method
1218 unsafe fn from_raw( in from_raw() method
1287 unsafe fn from_raw( in from_raw() method
1406 unsafe fn from_raw( in from_raw() method
1541 unsafe fn from_raw( in from_raw() method
1581 AlgAddr::from_raw(addr, l).map(|alg| Self { alg }) in from_raw()
1585 SockaddrIn::from_raw(addr, l).map(|sin| Self { sin }) in from_raw()
1589 SockaddrIn6::from_raw(addr, l).map(|sin6| Self { sin6 }) in from_raw()
1603 LinkAddr::from_raw(addr, l).map(|dl| Self { dl }) in from_raw()
[all …]
/third_party/rust/crates/rustix/src/backend/libc/process/
Dsyscalls.rs95 Uid::from_raw(uid) in getuid()
105 Uid::from_raw(uid) in geteuid()
115 Gid::from_raw(gid) in getgid()
125 Gid::from_raw(gid) in getegid()
146 Pid::from_raw(pid) in getppid()
/third_party/rust/crates/libloading/src/
Dsafe.rs148 self.0.get(symbol).map(|from| Symbol::from_raw(from, self)) in get()
245 pub unsafe fn from_raw<L>(sym: imp::Symbol<T>, library: &'lib L) -> Symbol<'lib, T> { in from_raw() method
/third_party/rust/crates/once_cell/src/
Drace.rs299 drop(unsafe { Box::from_raw(ptr) }) in drop()
332 let value = unsafe { Box::from_raw(ptr) }; in set()
378 drop(unsafe { Box::from_raw(ptr) }); in get_or_try_init()
/third_party/rust/crates/rustix/tests/process/
Dwait.rs20 let pid = unsafe { process::Pid::from_raw(child.id() as _) }; in test_waitpid()
/third_party/rust/crates/rustix/src/backend/libc/net/
Dtypes.rs35 pub const fn from_raw(raw: RawSocketType) -> Self { in from_raw() method
429 pub const fn from_raw(raw: RawAddressFamily) -> Self { in from_raw() method
618 pub const fn from_raw(raw: RawProtocol) -> Self { in from_raw() method
/third_party/rust/crates/rust-openssl/openssl/src/x509/
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 { in from_raw() method
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() method
2462 pub fn from_raw(id: c_int) -> Self { in from_raw() method
2530 X509PurposeId::from_raw((*x509_purpose).purpose) in purpose()
/third_party/rust/crates/cxx/src/
Dresult.rs65 what: Box::from_raw(s), in exception()
/third_party/python/Tools/c-analyzer/c_parser/parser/
D__init__.py129 yield ParsedItem.from_raw(result)

123