Skip to content

Commit 982c857

Browse files
Tweaks to ambassador
1 parent 0b1d01a commit 982c857

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/tiers/cmwA.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class ioUring{
138138

139139
void tallyBytes (int sent){sentBytes+=sent;}
140140

141-
static constexpr int Recvmsg=0,Send=1,Recv9=2,Recv=3,Close=4,Sendto=5,Fsync=6,Save=7,SaveOutput=8;
141+
static constexpr int Recvmsg=0,Send=1,Recv9=2,Recv=3,Save=4,SaveOutput=5,Fsync=6,Close=7,Sendto=8;
142142

143143
void recvmsg (){
144144
auto e=getSqe();
@@ -163,6 +163,14 @@ class ioUring{
163163
o->payloadlen);
164164
}
165165

166+
void send (){
167+
auto e=getSqe();
168+
auto sp=cmwBuf.outDuo();
169+
::io_uring_prep_send(e,1,sp.data(),sp.size(),0);
170+
::io_uring_sqe_set_data64(e,Send);
171+
e->flags=IOSQE_FIXED_FILE;
172+
}
173+
166174
void recv9 (bool stale=false){
167175
auto e=getSqe();
168176
::io_uring_prep_recv(e,1,cmwBuf.getuo(),9,MSG_WAITALL);
@@ -180,14 +188,6 @@ class ioUring{
180188
e->flags=IOSQE_FIXED_FILE;
181189
}
182190

183-
void send (){
184-
auto e=getSqe();
185-
auto sp=cmwBuf.outDuo();
186-
::io_uring_prep_send(e,1,sp.data(),sp.size(),0);
187-
::io_uring_sqe_set_data64(e,Send);
188-
e->flags=IOSQE_FIXED_FILE;
189-
}
190-
191191
void close (int fd){
192192
auto e=getSqe();
193193
::io_uring_prep_close(e,fd);

src/tiers/cmwAmb.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class ioUring{
138138

139139
void tallyBytes (int sent){sentBytes+=sent;}
140140

141-
static constexpr int Recvmsg=0,Send=1,Recv9=2,Recv=3,Close=4,Sendto=5,Fsync=6,Save=7,SaveOutput=8;
141+
static constexpr int Recvmsg=0,Send=1,Recv9=2,Recv=3,Save=4,SaveOutput=5,Fsync=6,Close=7,Sendto=8;
142142

143143
void recvmsg (){
144144
auto e=getSqe();
@@ -163,6 +163,14 @@ class ioUring{
163163
o->payloadlen);
164164
}
165165

166+
void send (){
167+
auto e=getSqe();
168+
auto sp=cmwBuf.outDuo();
169+
::io_uring_prep_send(e,1,sp.data(),sp.size(),0);
170+
::io_uring_sqe_set_data64(e,Send);
171+
e->flags=IOSQE_FIXED_FILE;
172+
}
173+
166174
void recv9 (bool stale=false){
167175
auto e=getSqe();
168176
::io_uring_prep_recv(e,1,cmwBuf.getuo(),9,MSG_WAITALL);
@@ -180,14 +188,6 @@ class ioUring{
180188
e->flags=IOSQE_FIXED_FILE;
181189
}
182190

183-
void send (){
184-
auto e=getSqe();
185-
auto sp=cmwBuf.outDuo();
186-
::io_uring_prep_send(e,1,sp.data(),sp.size(),0);
187-
::io_uring_sqe_set_data64(e,Send);
188-
e->flags=IOSQE_FIXED_FILE;
189-
}
190-
191191
void close (int fd){
192192
auto e=getSqe();
193193
::io_uring_prep_close(e,fd);

0 commit comments

Comments
 (0)