Rustfmt
This commit is contained in:
@@ -93,10 +93,16 @@ global_asm!(include_str!("sigsetjmp/aarch64/sigsetjmp.s"));
|
||||
global_asm!(include_str!("sigsetjmp/riscv64/sigsetjmp.s"));
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
global_asm!(include_str!("sigsetjmp/i386/sigsetjmp.s"), options(att_syntax));
|
||||
global_asm!(
|
||||
include_str!("sigsetjmp/i386/sigsetjmp.s"),
|
||||
options(att_syntax)
|
||||
);
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
global_asm!(include_str!("sigsetjmp/x86_64/sigsetjmp.s"), options(att_syntax));
|
||||
global_asm!(
|
||||
include_str!("sigsetjmp/x86_64/sigsetjmp.s"),
|
||||
options(att_syntax)
|
||||
);
|
||||
|
||||
extern "C" {
|
||||
pub fn sigsetjmp(jb: *mut u64, savemask: i32) -> i32;
|
||||
|
||||
@@ -40,7 +40,12 @@ unsafe fn scatter(iovs: &[iovec], vec: Vec<u8>) {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn preadv(fd: c_int, iov: *const iovec, iovcnt: c_int, offset: off_t) -> ssize_t {
|
||||
pub unsafe extern "C" fn preadv(
|
||||
fd: c_int,
|
||||
iov: *const iovec,
|
||||
iovcnt: c_int,
|
||||
offset: off_t,
|
||||
) -> ssize_t {
|
||||
if iovcnt < 0 || iovcnt > IOV_MAX {
|
||||
platform::ERRNO.set(errno::EINVAL);
|
||||
return -1;
|
||||
@@ -57,7 +62,12 @@ pub unsafe extern "C" fn preadv(fd: c_int, iov: *const iovec, iovcnt: c_int, off
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn pwritev(fd: c_int, iov: *const iovec, iovcnt: c_int, offset: off_t) -> ssize_t {
|
||||
pub unsafe extern "C" fn pwritev(
|
||||
fd: c_int,
|
||||
iov: *const iovec,
|
||||
iovcnt: c_int,
|
||||
offset: off_t,
|
||||
) -> ssize_t {
|
||||
if iovcnt < 0 || iovcnt > IOV_MAX {
|
||||
platform::ERRNO.set(errno::EINVAL);
|
||||
return -1;
|
||||
|
||||
@@ -503,7 +503,12 @@ impl Pal for Sys {
|
||||
fn gettid() -> pid_t {
|
||||
// This is used by pthread mutexes for reentrant checks and must be nonzero
|
||||
// and unique for each thread in the same process (but not cross-process)
|
||||
Self::current_os_tid().thread_fd.checked_add(1).unwrap().try_into().unwrap()
|
||||
Self::current_os_tid()
|
||||
.thread_fd
|
||||
.checked_add(1)
|
||||
.unwrap()
|
||||
.try_into()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
unsafe fn gettimeofday(tp: *mut timeval, tzp: *mut timezone) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user