19 #include <sys/types.h> 30 #include <boost/noncopyable.hpp> 68 void preadv(
int fd,
const iovec* iov,
int iovcnt, off_t start);
73 void pwrite(
int fd,
const void* buf,
size_t size, off_t start);
75 void pwritev(
int fd,
const iovec* iov,
int iovcnt, off_t start);
215 void decrementPending();
216 void initializeContext();
223 std::vector<Op*>&
result);
226 std::atomic<bool> ctxSet_{
false};
229 std::atomic<size_t> pending_{0};
230 std::atomic<size_t> submitted_{0};
253 return queue_.size();
268 void submit(OpFactory op);
friend std::ostream & operator<<(std::ostream &stream, const AsyncIOOp &o)
void complete(ssize_t result)
const NotificationCallback & notificationCallback() const
std::vector< Op * > canceled_
void pwritev(int fd, const iovec *iov, int iovcnt, off_t start)
constexpr detail::Map< Move > move
std::function< void(AsyncIOOp *)> NotificationCallback
—— Concurrent Priority Queue Implementation ——
std::shared_ptr< FizzServerContext > ctx_
void pread(int fd, void *buf, size_t size, off_t start)
void reset(NotificationCallback cb=NotificationCallback())
std::deque< OpFactory > queue_
void preadv(int fd, const iovec *iov, int iovcnt, off_t start)
std::vector< Op * > completed_
constexpr auto size(C const &c) -> decltype(c.size())
void pwrite(int fd, const void *buf, size_t size, off_t start)
std::function< AsyncIOOp *()> OpFactory
AsyncIOOp(NotificationCallback cb=NotificationCallback())
constexpr Range< Iter > range(Iter first, Iter last)
size_t totalSubmits() const
bool wait(Waiter *waiter, bool shouldSleep, Waiter *&next)
void setNotificationCallback(NotificationCallback cb)