MCPcopy Create free account
hub / github.com/apple/foundationdb / enqueue

Method enqueue

fdbrpc/include/fdbrpc/AsyncFileKAIO.actor.h:691–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689 }
690
691 void enqueue(IOBlock* io, const char* op, AsyncFileKAIO* owner) {
692 ASSERT(int64_t(io->buf) % 4096 == 0 && io->offset % 4096 == 0 && io->nbytes % 4096 == 0);
693
694 KAIOLogBlockEvent(owner->logFile, io, OpLogEntry::START);
695
696 io->flags |= 1;
697 io->eventfd = ctx.evfd;
698 io->prio = (int64_t(g_network->getCurrentTask()) << 32) - (++ctx.opsIssued);
699 // io->prio = - (++ctx.opsIssued);
700 io->owner = Reference<AsyncFileKAIO>::addRef(owner);
701
702 ctx.queue.push(io);
703 }
704
705 static int openFlags(int flags) {
706 int oflags = O_DIRECT | O_CLOEXEC;

Callers

nothing calls this directly

Calls 2

getCurrentTaskMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected