mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 13:26:48 +00:00
25 lines
596 B
Rust
25 lines
596 B
Rust
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
pub trait LinuxAbi {
|
|
/// Get number of syscall
|
|
fn syscall_num(&self) -> usize;
|
|
|
|
/// Get return value of syscall
|
|
fn syscall_ret(&self) -> usize;
|
|
|
|
/// Set number of syscall
|
|
fn set_syscall_num(&mut self, num: usize);
|
|
|
|
/// Set return value of syscall
|
|
fn set_syscall_ret(&mut self, ret: usize);
|
|
|
|
/// Get syscall args
|
|
fn syscall_args(&self) -> [usize; 6];
|
|
|
|
/// Set thread-local storage pointer
|
|
fn set_tls_pointer(&mut self, tls: usize);
|
|
|
|
/// Get thread-local storage pointer
|
|
fn tls_pointer(&self) -> usize;
|
|
}
|