Skip to content

Commit

Permalink
Tweak to ambassador
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebenezer-group committed Nov 4, 2024
1 parent 3b000da commit 74eaf70
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/tiers/cmwA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ constexpr ::uint64_t reedTag=1;
constexpr ::uint64_t closTag=2;
constexpr ::uint64_t sendtoTag=3;
class ioUring{
constexpr static int maxBatch=10;
::io_uring rng;
int s2ind;
int udpSock;
int const udpSock;
constexpr static int maxBatch=10;

auto getSqe (){
if(auto e=::io_uring_get_sqe(&rng);e)return e;
raise("getSqe");
else{
::io_uring_submit(&rng);
if(e=::io_uring_get_sqe(&rng))return e;
raise("getSqe");
}
}

public:
Expand Down Expand Up @@ -63,7 +67,7 @@ class ioUring{
if(-EINTR!=rc)raise("waitCqe",rc);
}
s2ind=0;
static ::io_uring_cqe *cqes[maxBatch];
static ::io_uring_cqe* cqes[maxBatch];
seen=::io_uring_peek_batch_cqe(&rng,&cqes[0],maxBatch);
return ::std::span<::io_uring_cqe*>(&cqes[0],seen);
}
Expand Down

0 comments on commit 74eaf70

Please sign in to comment.