Stxxl
1.4.0
|
#include <request_queue_impl_1q.h>
Public Member Functions | |
request_queue_impl_1q (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_1q () | |
Private Types | |
typedef request_queue_impl_1q | self |
typedef std::list< request_ptr > | queue_type |
Static Private Member Functions | |
static void * | worker (void *arg) |
Private Attributes | |
mutex | queue_mutex |
queue_type | 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_1q.h.
typedef std::list<request_ptr> stxxl::request_queue_impl_1q::queue_type [private] |
Definition at line 33 of file request_queue_impl_1q.h.
typedef request_queue_impl_1q stxxl::request_queue_impl_1q::self [private] |
Definition at line 32 of file request_queue_impl_1q.h.
stxxl::request_queue_impl_1q::request_queue_impl_1q | ( | int | n = 1 | ) |
Definition at line 40 of file request_queue_impl_1q.cpp.
References _thread_state, stxxl::request_queue_impl_worker::start_thread(), thread, and worker().
Definition at line 92 of file request_queue_impl_1q.cpp.
References _thread_state, sem, stxxl::request_queue_impl_worker::stop_thread(), and thread.
void stxxl::request_queue_impl_1q::add_request | ( | request_ptr & | req | ) | [virtual] |
Implements stxxl::request_queue.
Definition at line 46 of file request_queue_impl_1q.cpp.
References _thread_state, stxxl::request_ptr::empty(), queue_mutex, stxxl::request_queue_impl_worker::RUNNING, sem, and STXXL_THROW_INVALID_ARGUMENT.
bool stxxl::request_queue_impl_1q::cancel_request | ( | request_ptr & | req | ) | [virtual] |
Implements stxxl::request_queue.
Definition at line 70 of file request_queue_impl_1q.cpp.
References _thread_state, stxxl::request_ptr::empty(), stxxl::find(), queue_mutex, stxxl::request_queue_impl_worker::RUNNING, sem, and STXXL_THROW_INVALID_ARGUMENT.
void stxxl::request_queue_impl_1q::set_priority_op | ( | priority_op | op | ) | [inline, virtual] |
Reimplemented from stxxl::request_queue.
Definition at line 54 of file request_queue_impl_1q.h.
void * stxxl::request_queue_impl_1q::worker | ( | void * | arg | ) | [static, private] |
Definition at line 97 of file request_queue_impl_1q.cpp.
References stxxl::request_interface::serve(), stxxl::request_queue_impl_worker::TERMINATE, and stxxl::scoped_mutex_lock::unlock().
Referenced by request_queue_impl_1q().
const priority_op stxxl::request_queue_impl_1q::_priority_op = WRITE [static, private] |
Definition at line 42 of file request_queue_impl_1q.h.
Definition at line 38 of file request_queue_impl_1q.h.
Referenced by add_request(), cancel_request(), request_queue_impl_1q(), and ~request_queue_impl_1q().
Definition at line 36 of file request_queue_impl_1q.h.
Definition at line 35 of file request_queue_impl_1q.h.
Referenced by add_request(), and cancel_request().
semaphore stxxl::request_queue_impl_1q::sem [private] |
Definition at line 40 of file request_queue_impl_1q.h.
Referenced by add_request(), cancel_request(), and ~request_queue_impl_1q().
Definition at line 39 of file request_queue_impl_1q.h.
Referenced by request_queue_impl_1q(), and ~request_queue_impl_1q().