Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/condy/ring_settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ class RingSettings {
/**
* @brief Resize the rings of the io_uring instance.
* @details See io_uring_resize_rings for more details.
* @deprecated Unsafe during CQE processing; use RuntimeOptions instead.
* @param params Pointer to the io_uring_params structure.
*/
[[deprecated("unsafe during CQE processing, use RuntimeOptions")]]
int set_rings_size(io_uring_params *params) noexcept {
return io_uring_resize_rings(&ring_, params);
}
Expand Down
24 changes: 0 additions & 24 deletions tests/test_ring_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,30 +94,6 @@ TEST_CASE("test ring_settings - clock") {
}
#endif

#if !IO_URING_CHECK_VERSION(2, 9) // >= 2.9
TEST_CASE("test ring_settings - rings_size") {
// Defer taskrun is required
condy::Runtime runtime(condy::RuntimeOptions().enable_defer_taskrun());

auto func = [&]() -> condy::Coro<void> {
for (int i = 0; i < 5; i++) {
co_await condy::async_nop();
}
auto &settings = runtime.settings();
io_uring_params params = {};
params.sq_entries = 2;
params.cq_entries = 4;
// Set at runtime is ok
REQUIRE(settings.set_rings_size(&params) == 0);
for (int i = 0; i < 5; i++) {
co_await condy::async_nop();
}
};

condy::sync_wait(runtime, func());
}
#endif

#if !IO_URING_CHECK_VERSION(2, 10) // >= 2.10
TEST_CASE("test ring_settings - iowait") {
condy::Runtime runtime;
Expand Down
Loading