Implement SYS_CALL.

This commit is contained in:
4lDO2
2024-12-27 18:19:51 +01:00
parent 3edfe79f6f
commit 3117ea451c
3 changed files with 18 additions and 0 deletions
+13
View File
@@ -333,3 +333,16 @@ bitflags! {
const INHIBIT_DELIVERY = 1;
}
}
bitflags! {
pub struct CallFlags: usize {
// unused
const BIT0 = 1 << 0;
const BIT1 = 1 << 1;
const BIT2 = 1 << 2;
const BIT3 = 1 << 3;
const BIT4 = 1 << 4;
const BIT5 = 1 << 5;
const BIT6 = 1 << 6;
const BIT7 = 1 << 7;
}
}
+3
View File
@@ -28,6 +28,9 @@ pub const SYS_FCHOWN: usize = SYS_CLASS_FILE | 207;
pub const SYS_FCNTL: usize = SYS_CLASS_FILE | 55;
pub const SYS_FEVENT: usize = SYS_CLASS_FILE | 927;
// SYS_CALL, fd, inout buf ptr, inout buf len, flags, metadata buf ptr, metadata buf len
pub const SYS_CALL: usize = SYS_CLASS_FILE | SYS_ARG_SLICE | SYS_ARG_MSLICE | 0xCA11;
pub const SYS_SENDFD: usize = SYS_CLASS_FILE | 34;
pub const SYS_GETDENTS: usize = SYS_CLASS_FILE | 43;
+2
View File
@@ -128,6 +128,7 @@ pub enum Opcode {
Getdents = 26,
CloseMsg = 27,
Call = 28,
}
impl Opcode {
@@ -166,6 +167,7 @@ impl Opcode {
25 => Cancel,
26 => Getdents,
27 => CloseMsg,
28 => Call,
_ => return None,
})