Stxxl
1.4.0
|
#include <request_queue_impl_qwqr.h>
Public Member Functions | |
request_queue_impl_qwqr (int n=1) | |
void | set_priority_op (priority_op op) |
void | add_request (request_ptr &req) |
bool | cancel_request (request_ptr &req) |
~request_queue_impl_qwqr () | |
Private Types | |
typedef request_queue_impl_qwqr | self |
typedef std::list< request_ptr > | queue_type |
Static Private Member Functions | |
static void * | worker (void *arg) |
Private Attributes | |
mutex | write_mutex |
mutex | read_mutex |
queue_type | write_queue |
queue_type | read_queue |
state< thread_state > | _thread_state |
thread_type | thread |
semaphore | sem |
Static Private Attributes | |
static const priority_op | _priority_op = WRITE |
Definition at line 29 of file request_queue_impl_qwqr.h.
typedef std::list<request_ptr> stxxl::request_queue_impl_qwqr::queue_type [private] |
Definition at line 33 of file request_queue_impl_qwqr.h.
typedef request_queue_impl_qwqr stxxl::request_queue_impl_qwqr::self [private] |
Definition at line 32 of file request_queue_impl_qwqr.h.
Definition at line 40 of file request_queue_impl_qwqr.cpp.
References _thread_state, stxxl::request_queue_impl_worker::start_thread(), thread, and worker().
Definition at line 123 of file request_queue_impl_qwqr.cpp.
References _thread_state, sem, stxxl::request_queue_impl_worker::stop_thread(), and thread.
void stxxl::request_queue_impl_qwqr::add_request | ( | request_ptr & | req | ) | [virtual] |
Implements stxxl::request_queue.
Definition at line 46 of file request_queue_impl_qwqr.cpp.
References _thread_state, stxxl::request_ptr::empty(), stxxl::request_ptr::get(), stxxl::request::get_type(), stxxl::request_queue::READ, read_mutex, read_queue, stxxl::request_queue_impl_worker::RUNNING, sem, STXXL_THROW_INVALID_ARGUMENT, write_mutex, and write_queue.
bool stxxl::request_queue_impl_qwqr::cancel_request | ( | request_ptr & | req | ) | [virtual] |
Implements stxxl::request_queue.
Definition at line 89 of file request_queue_impl_qwqr.cpp.
References _thread_state, stxxl::request_ptr::empty(), stxxl::find(), stxxl::request_ptr::get(), stxxl::request::get_type(), stxxl::request_queue::READ, read_mutex, read_queue, stxxl::request_queue_impl_worker::RUNNING, sem, STXXL_THROW_INVALID_ARGUMENT, write_mutex, and write_queue.
void stxxl::request_queue_impl_qwqr::set_priority_op | ( | priority_op | op | ) | [inline, virtual] |
Reimplemented from stxxl::request_queue.
Definition at line 56 of file request_queue_impl_qwqr.h.
void * stxxl::request_queue_impl_qwqr::worker | ( | void * | arg | ) | [static, private] |
Definition at line 128 of file request_queue_impl_qwqr.cpp.
References stxxl::request_queue::NONE, stxxl::request::nref(), stxxl::request_queue::READ, stxxl::request_interface::serve(), stxxl::request_queue_impl_worker::TERMINATE, stxxl::scoped_mutex_lock::unlock(), and stxxl::request_queue::WRITE.
Referenced by request_queue_impl_qwqr().
const priority_op stxxl::request_queue_impl_qwqr::_priority_op = WRITE [static, private] |
Definition at line 44 of file request_queue_impl_qwqr.h.
Definition at line 40 of file request_queue_impl_qwqr.h.
Referenced by add_request(), cancel_request(), request_queue_impl_qwqr(), and ~request_queue_impl_qwqr().
Definition at line 36 of file request_queue_impl_qwqr.h.
Referenced by add_request(), and cancel_request().
Definition at line 38 of file request_queue_impl_qwqr.h.
Referenced by add_request(), and cancel_request().
semaphore stxxl::request_queue_impl_qwqr::sem [private] |
Definition at line 42 of file request_queue_impl_qwqr.h.
Referenced by add_request(), cancel_request(), and ~request_queue_impl_qwqr().
Definition at line 41 of file request_queue_impl_qwqr.h.
Referenced by request_queue_impl_qwqr(), and ~request_queue_impl_qwqr().
Definition at line 35 of file request_queue_impl_qwqr.h.
Referenced by add_request(), and cancel_request().
Definition at line 37 of file request_queue_impl_qwqr.h.
Referenced by add_request(), and cancel_request().