-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add io_uring_sqe64,io_uring_sqe128,io_uring_cqe16,io_uring_cqe32 #998
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1015,8 +1015,8 @@ impl core::fmt::Debug for io_uring_user_data { | |||||
/// An io_uring Submission Queue Entry. | ||||||
#[allow(missing_docs)] | ||||||
#[repr(C)] | ||||||
#[derive(Copy, Clone, Default)] | ||||||
pub struct io_uring_sqe { | ||||||
#[derive(Copy, Clone)] | ||||||
pub struct io_uring_sqe<T: Copy> { | ||||||
pub opcode: IoringOp, | ||||||
pub flags: IoringSqeFlags, | ||||||
pub ioprio: ioprio_union, | ||||||
|
@@ -1029,9 +1029,15 @@ pub struct io_uring_sqe { | |||||
pub buf: buf_union, | ||||||
pub personality: u16, | ||||||
pub splice_fd_in_or_file_index: splice_fd_in_or_file_index_union, | ||||||
pub addr3_or_cmd: addr3_or_cmd_union, | ||||||
pub addr3_or_cmd: addr3_or_cmd_union<T>, | ||||||
} | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
pub type io_uring_sqe64 = io_uring_cqe<()>; | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
pub type io_uring_sqe128 = io_uring_cqe<[u8; 80]>; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
#[allow(missing_docs)] | ||||||
#[repr(C)] | ||||||
#[derive(Copy, Clone)] | ||||||
|
@@ -1053,9 +1059,9 @@ pub union len_union { | |||||
#[allow(missing_docs)] | ||||||
#[repr(C)] | ||||||
#[derive(Copy, Clone)] | ||||||
pub union addr3_or_cmd_union { | ||||||
pub union addr3_or_cmd_union<T: Copy> { | ||||||
pub addr3: addr3_struct, | ||||||
pub cmd: [u8; 0], | ||||||
pub cmd: T, | ||||||
} | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
|
@@ -1165,14 +1171,20 @@ pub struct io_uring_sync_cancel_reg { | |||||
/// automatically copyable. | ||||||
#[allow(missing_docs)] | ||||||
#[repr(C)] | ||||||
#[derive(Debug, Default)] | ||||||
pub struct io_uring_cqe { | ||||||
#[derive(Clone, Copy)] | ||||||
pub struct io_uring_cqe<T: Copy> { | ||||||
pub user_data: io_uring_user_data, | ||||||
pub res: i32, | ||||||
pub flags: IoringCqeFlags, | ||||||
pub big_cqe: sys::__IncompleteArrayField<u64>, | ||||||
pub big_cqe: T, | ||||||
} | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
pub type io_uring_cqe16 = io_uring_cqe<()>; | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
pub type io_uring_cqe32 = io_uring_cqe<[u64; 2]>; | ||||||
|
||||||
#[allow(missing_docs)] | ||||||
#[repr(C)] | ||||||
#[derive(Copy, Clone, Default)] | ||||||
|
@@ -1390,13 +1402,6 @@ impl Default for addr_or_splice_off_in_union { | |||||
} | ||||||
} | ||||||
|
||||||
impl Default for addr3_or_cmd_union { | ||||||
#[inline] | ||||||
fn default() -> Self { | ||||||
default_union!(addr3_or_cmd_union, addr3) | ||||||
} | ||||||
} | ||||||
|
||||||
impl Default for op_flags_union { | ||||||
#[inline] | ||||||
fn default() -> Self { | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.