[−][src]Enum syscall::io_uring::v1::StandardOpcode
The standard opcodes, which are a superset of the filesystem (scheme-compatible) syscalls.
Opcodes with a value above 127 are specific to the producer; the kernel for example, also
has syscalls for managing memory and processes, while a userspace producer such as nvmed
can provide custom messages for things like TRIM.
Variants (Non-exhaustive)
A no-operation, using only the implicit fields. Useful for testing or benchmarking io_uring operation.
A call that opens a file, given a path represented as a string. Uses all implicit fields.
required field | usage description | SIZE |
---|---|---|
syscall_flags | OpenFlags | BOTH |
addr | a pointer to a buffer containing the path | BOTH |
len | the length of the buffer containing the path | BOTH |
fd | if OPEN_AT , points to an fd referencing the parent | BOTH |
offset | fcntl flags (upper), file mode if O_CREAT (lower) | BOTH |
additional1 | not used/producer specific | 64 |
additional2 | not used/producer specific | 64 |
A call that closes a file, flushing required buffers if told to. Uses all implicit
fields. On failure, returns the number of successfully closed file descriptors, or zero
unless CLOSE_MANY
.
required field | usage description | SIZE |
---|---|---|
syscall_flags | CloseFlags | BOTH |
addr | not used/producer specific | BOTH |
len | if CLOSE_MANY , gives the count of the range of fds | BOTH |
fd | the file descriptor to close, or start if CLOSE_MANY | BOTH |
offset | not used/producer specific | BOTH |
additional1 | not used/producer specific | 64 |
additional2 | not used/producer specific | 64 |
A call that reads bytes from a file descriptor. Uses all implicit fields.
required field | usage description | SIZE |
---|---|---|
syscall_flags | ReadFlags | BOTH |
addr | the address to read into | BOTH |
len | the number of iovecs if VECTORED , otherwise the size | BOTH |
fd | the file descriptor to read from | BOTH |
offset | the offset to read from unless CHANGE_OFFSET | BOTH |
additional1 | not used/producer specific | 64 |
additional2 | not used/producer specific | 64 |
A call that reads bytes from a file. Uses all implicit fields.
required field | usage description | SIZE |
---|---|---|
syscall_flags | WriteFlags | BOTH |
addr | the address to write from | BOTH |
len | the number of iovecs if VECTORED , otherwise the size | BOTH |
fd | the file descriptor to write to | BOTH |
offset | the offset to write to unless CHANGE_OFFSET | BOTH |
additional1 | not used/producer specific | 64 |
additional2 | not used/producer specific | 64 |
A call that changes the current file offset. Uses all implicit fields.
required field | usage description | SIZE |
---|---|---|
syscall_flags | whence arg (SEEK_SET , SEEK_END , or SEEK_CUR | BOTH |
addr | not used/producer specific | BOTH |
len | not used/producer specific | BOTH |
fd | the file descriptor which offset will be changed | BOTH |
offset | a signed integer which is added to the offset from whence | BOTH |
additional1 | not used/producer specific | 64 |
additional2 | not used/producer specific | 64 |
TODO
TODO
TODO
TODO
TODO
A call that when submitted, sends one completion entry for every update to a file or
set of files, when the update matched the specific flags. If the flags
field
contains IoUringSqeFlags::SUBSCRIBE
, there will be one completio for each event,
otherwise only a single event. Uses all implicit fields.
required field | usage description | SIZE |
---|---|---|
syscall_flags | FilesUpdateFlags | BOTH |
addr | if MULTI , the address of an array of fds | BOTH |
fd | if not MULTI , the fd to follow, otherwise unused | BOTH |
offset | not used/producer specific | BOTH |
len | if MULTI , the number of fds in the array | BOTH |
additional1 | not used/producer specifc | 64 |
additional2 | not used/producer specific | 64 |
A syscall where the four syscall parameters, namely the number (a), b, c, and d, all
are passed through as if they were a regular scheme packet. The size of file
descriptors will be limited to 32 bits if SqEntry32
is used. Uses all implicit
fields. This allows talking to schemes asynchronously and without blocking, for other
syscalls than read and write, with a proper wakeup system.
required field | usage description | SIZE |
---|---|---|
syscall_flags | fcntl F_SETFL flags, e.g. O_NONBLOCK or O_DIRECT | BOTH |
addr | the "a" field of the syscall, which is the syscall number | BOTH |
fd | the "b" field, which typically is the file descriptor | BOTH |
offset | the "c" field, which usually is the pointer to a buffer | BOTH |
len | the "d" field, which usually is the length of a buffer | BOTH |
additional1 | the "e" field (not scheme compatible yet) | 64 |
additional2 | the "f" field (not scheme compatible yet) | 64 |
Implementations
impl StandardOpcode
[src]
pub const MAX_OPCODE: u8
[src]
The highest opcode number that is reserved to standard opcodes.
pub fn from_raw(raw: u8) -> Option<Self>
[src]
Trait Implementations
impl Clone for StandardOpcode
[src]
fn clone(&self) -> StandardOpcode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for StandardOpcode
[src]
impl Debug for StandardOpcode
[src]
impl Eq for StandardOpcode
[src]
impl Hash for StandardOpcode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<StandardOpcode> for StandardOpcode
[src]
fn eq(&self, other: &StandardOpcode) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for StandardOpcode
[src]
impl StructuralPartialEq for StandardOpcode
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,