private int _pollOnce() throws IOException { int res = poll.execute().getPolls(); if (res > 0) { for (int i = 0; i < res; i++){ IbvWC wc = wcList[i]; dispatchCqEvent(wc); } } return res; }
private int _pollOnce() throws IOException { int res = poll.execute().getPolls(); if (res > 0) { for (int i = 0; i < res; i++){ IbvWC wc = wcList[i]; dispatchCqEvent(wc); } } return res; }
private int _pollUntil(AtomicInteger future, long timeout) throws IOException { long count = 0; final long checkTimeOut = 1 << 14 /* 16384 */; long startTime = System.nanoTime(); while (future.get() == 0) { int res = poll.execute().getPolls(); if (res > 0) { for (int i = 0; i < res; i++) { IbvWC wc = wcList[i]; dispatchCqEvent(wc); } } if (count == checkTimeOut) { count = 0; if ((System.nanoTime() - startTime) / 1e6 > timeout) { break; } } count++; } return 1; }
private int _pollUntil(AtomicInteger future, long timeout) throws IOException { long count = 0; final long checkTimeOut = 1 << 14 /* 16384 */; long startTime = System.nanoTime(); while(future.get() == 0){ int res = poll.execute().getPolls(); if (res > 0){ for (int i = 0; i < res; i++){ IbvWC wc = wcList[i]; dispatchCqEvent(wc); } } if (count == checkTimeOut) { count = 0; if ((System.nanoTime() - startTime) / 1e6 > timeout) { break; } } count++; } return 1; }
private int pollUntil() throws IOException { int res = 0; while (res == 0) { res = poll.execute().getPolls(); } return res; } }
private void awaitSends() throws IOException { while (sendPending > 0) { int res = poll.execute().getPolls(); if (res > 0){ for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } } }
private void awaitRecvs() throws IOException { while (recvPending > 0) { int res = poll.execute().getPolls(); if (res > 0){ for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } } }
private void awaitRecvs() throws IOException { while (recvPending > 0) { int res = poll.execute().getPolls(); if (res > 0){ for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } } }
private void awaitSends() throws IOException { while (sendPending > 0) { int res = poll.execute().getPolls(); if (res > 0){ for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } } }
private int pollRecvs() throws IOException { if (recvPending == 0){ return 0; } int recvCount = 0; while (recvCount == 0){ int res = 0; while (res == 0) { res = poll.execute().getPolls(); } for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvCount++; recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } return recvCount; }
private int pollRecvs() throws IOException { if (recvPending == 0){ return 0; } int recvCount = 0; while (recvCount == 0){ int res = 0; while (res == 0) { res = poll.execute().getPolls(); } for (int i = 0; i < res; i++){ if (wcList[i].getOpcode() == 128){ // System.out.println("recv from wrid " + wcList[i].getWr_id()); recvCount++; recvBudget++; recvPending--; } else { sendBudget++; sendPending--; } } } return recvCount; }
int res = pollCqCall.execute().getPolls(); if (res < 0){ break;