mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Allow passing the process Context
to syscall handlers
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
19ad2a2eb4
commit
66a37da214
@ -10,7 +10,7 @@ use crate::{
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
pub fn sys_pipe2(fds: Vaddr, flags: u32) -> Result<SyscallReturn> {
|
||||
pub fn sys_pipe2(fds: Vaddr, flags: u32, _ctx: &Context) -> Result<SyscallReturn> {
|
||||
debug!("flags: {:?}", flags);
|
||||
|
||||
let (pipe_reader, pipe_writer) = {
|
||||
@ -48,8 +48,8 @@ pub fn sys_pipe2(fds: Vaddr, flags: u32) -> Result<SyscallReturn> {
|
||||
Ok(SyscallReturn::Return(0))
|
||||
}
|
||||
|
||||
pub fn sys_pipe(fds: Vaddr) -> Result<SyscallReturn> {
|
||||
self::sys_pipe2(fds, 0)
|
||||
pub fn sys_pipe(fds: Vaddr, ctx: &Context) -> Result<SyscallReturn> {
|
||||
self::sys_pipe2(fds, 0, ctx)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Pod)]
|
||||
|
Reference in New Issue
Block a user