Skip to content

Commit

Permalink
Added linux_like module
Browse files Browse the repository at this point in the history
  • Loading branch information
YohDeadfall committed Nov 12, 2024
1 parent be62164 commit dc702cd
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/shims/unix/android/foreign_items.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use rustc_abi::ExternAbi;
use rustc_span::Symbol;

use self::shims::unix::linux::epoll::EvalContextExt as _;
use self::shims::unix::linux::eventfd::EvalContextExt as _;
use crate::shims::unix::android::thread::prctl;
use crate::shims::unix::linux::syscall::syscall;
use crate::shims::unix::linux_like::epoll::EvalContextExt as _;
use crate::shims::unix::linux_like::eventfd::EvalContextExt as _;
use crate::shims::unix::linux_like::syscall::syscall;
use crate::*;

pub fn is_dyn_sym(_name: &str) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/shims/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::rc::{Rc, Weak};
use rustc_abi::Size;

use crate::helpers::check_min_arg_count;
use crate::shims::unix::linux::epoll::EpollReadyEvents;
use crate::shims::unix::linux_like::epoll::EpollReadyEvents;
use crate::shims::unix::*;
use crate::*;

Expand Down
6 changes: 3 additions & 3 deletions src/shims/unix/linux/foreign_items.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use rustc_abi::ExternAbi;
use rustc_span::Symbol;

use self::shims::unix::linux::epoll::EvalContextExt as _;
use self::shims::unix::linux::eventfd::EvalContextExt as _;
use self::shims::unix::linux::mem::EvalContextExt as _;
use self::shims::unix::linux::syscall::syscall;
use self::shims::unix::linux_like::epoll::EvalContextExt as _;
use self::shims::unix::linux_like::eventfd::EvalContextExt as _;
use self::shims::unix::linux_like::syscall::syscall;
use crate::machine::{SIGRTMAX, SIGRTMIN};
use crate::shims::unix::*;
use crate::*;
Expand Down
4 changes: 0 additions & 4 deletions src/shims/unix/linux/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
pub mod epoll;
pub mod eventfd;
pub mod foreign_items;
pub mod mem;
pub mod sync;
pub mod syscall;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::io::ErrorKind;

use crate::concurrency::VClock;
use crate::shims::unix::fd::FileDescriptionRef;
use crate::shims::unix::linux::epoll::{EpollReadyEvents, EvalContextExt as _};
use crate::shims::unix::linux_like::epoll::{EpollReadyEvents, EvalContextExt as _};
use crate::shims::unix::*;
use crate::*;

Expand Down
4 changes: 4 additions & 0 deletions src/shims/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub mod epoll;
pub mod eventfd;
pub mod sync;
pub mod syscall;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use rustc_abi::ExternAbi;
use rustc_span::Symbol;

use self::shims::unix::linux::eventfd::EvalContextExt as _;
use crate::helpers::check_min_arg_count;
use crate::shims::unix::linux::sync::futex;
use crate::shims::unix::linux_like::eventfd::EvalContextExt as _;
use crate::shims::unix::linux_like::sync::futex;
use crate::*;

pub fn syscall<'tcx>(
Expand Down
3 changes: 2 additions & 1 deletion src/shims/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ mod unnamed_socket;
mod android;
mod freebsd;
mod linux;
mod linux_like;
mod macos;
mod solarish;

// All the Unix-specific extension traits
pub use self::env::{EvalContextExt as _, UnixEnvVars};
pub use self::fd::{EvalContextExt as _, FdTable, FileDescription};
pub use self::fs::{DirTable, EvalContextExt as _};
pub use self::linux::epoll::EpollInterestTable;
pub use self::linux_like::epoll::EpollInterestTable;
pub use self::mem::EvalContextExt as _;
pub use self::sync::EvalContextExt as _;
pub use self::thread::{EvalContextExt as _, ThreadNameResult};
Expand Down
2 changes: 1 addition & 1 deletion src/shims/unix/unnamed_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_abi::Size;

use crate::concurrency::VClock;
use crate::shims::unix::fd::{FileDescriptionRef, WeakFileDescriptionRef};
use crate::shims::unix::linux::epoll::{EpollReadyEvents, EvalContextExt as _};
use crate::shims::unix::linux_like::epoll::{EpollReadyEvents, EvalContextExt as _};
use crate::shims::unix::*;
use crate::*;

Expand Down

0 comments on commit dc702cd

Please sign in to comment.