16 #ifndef STXXL_IO_DISK_QUEUES_HEADER
17 #define STXXL_IO_DISK_QUEUES_HEADER
54 #ifdef STXXL_HACK_SINGLE_IO_THREAD
57 request_queue_map::iterator qi = queues.find(disk);
59 if (qi == queues.end())
62 #if STXXL_HAVE_LINUXAIO_FILE
63 if (dynamic_cast<linuxaio_request*>(req.
get()))
65 dynamic_cast<linuxaio_file*>(req->
get_file())->get_desired_queue_length()
87 #ifdef STXXL_HACK_SINGLE_IO_THREAD
90 if (queues.find(disk) != queues.end())
91 return queues[disk]->cancel_request(req);
98 if (queues.find(disk) != queues.end())
107 for (request_queue_map::iterator i = queues.begin(); i != queues.end(); i++)
118 for (request_queue_map::iterator i = queues.begin(); i != queues.end(); i++)
119 i->second->set_priority_op(op);
127 #endif // !STXXL_IO_DISK_QUEUES_HEADER
Interface of a request_queue to which requests can be added and canceled.
Implementation of a local request queue having two queues, one for read and one for write requests...
void set_priority_op(request_queue::priority_op op)
Changes requests priorities.
Encapsulates disk queues.
Type * get() const
return the enclosed pointer.
void add_request(request_ptr &req, DISKID disk)
std::map< DISKID, request_queue * > request_queue_map
static instance_pointer get_instance()
#define STXXL_BEGIN_NAMESPACE
request_queue * get_queue(DISKID disk)
virtual void add_request(request_ptr &req)=0
Queue for linuxaio_file(s)
bool cancel_request(request_ptr &req, DISKID disk)
Cancel a request. The specified request is canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.
#define STXXL_END_NAMESPACE