Skip to content
Snippets Groups Projects
Commit dcdfd35b authored by Florian Fischer's avatar Florian Fischer
Browse files

remove custom liburing function

Since 171ae9d4 we use are more recent
liburing version with io_uring_prep_msg_ring support.
parent 033c8161
No related branches found
No related tags found
No related merge requests found
...@@ -22,20 +22,6 @@ ...@@ -22,20 +22,6 @@
using emper::io::IoContext; using emper::io::IoContext;
using emper::lib::TaggedPtr; using emper::lib::TaggedPtr;
#ifndef IORING_OP_MSG_RING
#define IORING_OP_MSG_RING (IORING_OP_LINKAT + 1)
#endif
// TODO: Remove when liburing supports IORING_OP_MSG_RING
static void io_uring_prep_msg_ring(struct io_uring_sqe* sqe, int ring_fd, void* user_data,
uint32_t res) {
io_uring_prep_nop(sqe);
sqe->opcode = IORING_OP_MSG_RING;
sqe->fd = ring_fd;
sqe->off = (uint64_t)user_data;
sqe->len = res;
}
namespace emper::sleep_strategy { namespace emper::sleep_strategy {
thread_local bool AbstractIoSleepStrategy::readingGlobal = false; thread_local bool AbstractIoSleepStrategy::readingGlobal = false;
...@@ -111,7 +97,7 @@ void AbstractIoSleepStrategy::sendSpecificNotification(workerid_t workerId) { ...@@ -111,7 +97,7 @@ void AbstractIoSleepStrategy::sendSpecificNotification(workerid_t workerId) {
TaggedPtr tag((void*)nullptr, static_cast<uint16_t>(IoContext::PointerTags::NewWorkNotification), TaggedPtr tag((void*)nullptr, static_cast<uint16_t>(IoContext::PointerTags::NewWorkNotification),
true); true);
io_uring_prep_msg_ring(sqe, runtime.ioContexts[workerId]->ring.ring_fd, tag, 0); io_uring_prep_msg_ring(sqe, runtime.ioContexts[workerId]->ring.ring_fd, 0, uintptr_t(tag), 0);
// Do not generate a cqe on the submiting io_uring // Do not generate a cqe on the submiting io_uring
sqe->flags = IOSQE_CQE_SKIP_SUCCESS; sqe->flags = IOSQE_CQE_SKIP_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment