Rustfmt, add CallFlags::CONSUME.
This commit is contained in:
+2
-4
@@ -1,15 +1,13 @@
|
||||
use super::error::{Error, Result};
|
||||
use core::arch::asm;
|
||||
use core::{
|
||||
mem,
|
||||
ops::{Deref, DerefMut},
|
||||
slice,
|
||||
};
|
||||
use core::arch::asm;
|
||||
use super::error::{Error, Result};
|
||||
|
||||
|
||||
pub const PAGE_SIZE: usize = 4096;
|
||||
|
||||
|
||||
#[cfg(feature = "userspace")]
|
||||
macro_rules! syscall {
|
||||
($($name:ident($a:ident, $($b:ident, $($c:ident, $($d:ident, $($e:ident, $($f:ident, )?)?)?)?)?);)+) => {
|
||||
|
||||
+4
-1
@@ -383,7 +383,10 @@ impl Deref for RtSigInfo {
|
||||
impl DerefMut for RtSigInfo {
|
||||
fn deref_mut(&mut self) -> &mut [u8] {
|
||||
unsafe {
|
||||
slice::from_raw_parts_mut(self as *mut RtSigInfo as *mut u8, mem::size_of::<RtSigInfo>())
|
||||
slice::from_raw_parts_mut(
|
||||
self as *mut RtSigInfo as *mut u8,
|
||||
mem::size_of::<RtSigInfo>(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-9
@@ -335,14 +335,17 @@ bitflags! {
|
||||
}
|
||||
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;
|
||||
// reserved
|
||||
const RSVD0 = 1 << 0;
|
||||
const RSVD1 = 1 << 1;
|
||||
const RSVD2 = 1 << 2;
|
||||
const RSVD3 = 1 << 3;
|
||||
const RSVD4 = 1 << 4;
|
||||
const RSVD5 = 1 << 5;
|
||||
const RSVD6 = 1 << 6;
|
||||
const RSVD7 = 1 << 7;
|
||||
|
||||
/// Remove the fd from the caller's file table before sending the message.
|
||||
const CONSUME = 1 << 8;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ pub enum Opcode {
|
||||
CloseMsg = 27,
|
||||
Call = 28,
|
||||
|
||||
OpenAt = 29, // fd, buf_ptr, buf_len, flags
|
||||
OpenAt = 29, // fd, buf_ptr, buf_len, flags
|
||||
}
|
||||
|
||||
impl Opcode {
|
||||
|
||||
Reference in New Issue
Block a user