io/uring/Queue: add method RequireSubmitEntry()
Fixes assertion failure when the submit queue is empty.
This commit is contained in:
committed by
Max Kellermann
parent
c8f174ac92
commit
799032505e
@@ -63,6 +63,14 @@ public:
|
||||
return ring.GetSubmitEntry();
|
||||
}
|
||||
|
||||
/**
|
||||
* Like GetSubmitEntry(), but call Submit() if the submit
|
||||
* queue is full.
|
||||
*
|
||||
* May throw exceptions if Submit() fails.
|
||||
*/
|
||||
struct io_uring_sqe &RequireSubmitEntry();
|
||||
|
||||
bool HasPending() const noexcept {
|
||||
return !operations.empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user