STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::request_queue_impl_qwqr Class Reference

Detailed Description

Implementation of a local request queue having two queues, one for read and one for write requests, thus having two threads. This is the default implementation.

Definition at line 32 of file request_queue_impl_qwqr.h.

+ Inheritance diagram for stxxl::request_queue_impl_qwqr:
+ Collaboration diagram for stxxl::request_queue_impl_qwqr:

Public Member Functions

 request_queue_impl_qwqr (int n=1)
 
 ~request_queue_impl_qwqr ()
 
void add_request (request_ptr &req)
 
bool cancel_request (request_ptr &req)
 
void set_priority_op (priority_op op)
 
- Public Member Functions inherited from stxxl::request_queue
virtual ~request_queue () noexcept(false)
 
virtual void set_priority_op (priority_op p)
 

Private Types

typedef std::list< request_ptrqueue_type
 
typedef request_queue_impl_qwqr self
 

Static Private Member Functions

static void * worker (void *arg)
 

Private Attributes

mutex m_read_mutex
 
queue_type m_read_queue
 
semaphore m_sem
 
thread_type m_thread
 
state< thread_statem_thread_state
 
mutex m_write_mutex
 
queue_type m_write_queue
 

Static Private Attributes

static const priority_op m_priority_op = WRITE
 

Additional Inherited Members

- Public Types inherited from stxxl::request_queue
enum  priority_op { READ, WRITE, NONE }
 
- Protected Types inherited from stxxl::request_queue_impl_worker
enum  thread_state { NOT_RUNNING, RUNNING, TERMINATING, TERMINATED }
 
typedef pthread_t thread_type
 
- Protected Member Functions inherited from stxxl::request_queue_impl_worker
void start_thread (void *(*worker)(void *), void *arg, thread_type &t, state< thread_state > &s)
 
void stop_thread (thread_type &t, state< thread_state > &s, semaphore &sem)
 

Member Typedef Documentation

Definition at line 36 of file request_queue_impl_qwqr.h.

Constructor & Destructor Documentation

stxxl::request_queue_impl_qwqr::request_queue_impl_qwqr ( int  n = 1)
stxxl::request_queue_impl_qwqr::~request_queue_impl_qwqr ( )

Member Function Documentation

void stxxl::request_queue_impl_qwqr::set_priority_op ( priority_op  op)
inline

Definition at line 59 of file request_queue_impl_qwqr.h.

References stxxl::STXXL_UNUSED().

Member Data Documentation

const priority_op stxxl::request_queue_impl_qwqr::m_priority_op = WRITE
staticprivate

Definition at line 47 of file request_queue_impl_qwqr.h.

mutex stxxl::request_queue_impl_qwqr::m_read_mutex
private

Definition at line 39 of file request_queue_impl_qwqr.h.

Referenced by add_request(), and cancel_request().

queue_type stxxl::request_queue_impl_qwqr::m_read_queue
private

Definition at line 41 of file request_queue_impl_qwqr.h.

Referenced by add_request(), and cancel_request().

semaphore stxxl::request_queue_impl_qwqr::m_sem
private
thread_type stxxl::request_queue_impl_qwqr::m_thread
private

Definition at line 44 of file request_queue_impl_qwqr.h.

Referenced by request_queue_impl_qwqr(), and ~request_queue_impl_qwqr().

state<thread_state> stxxl::request_queue_impl_qwqr::m_thread_state
private
mutex stxxl::request_queue_impl_qwqr::m_write_mutex
private

Definition at line 38 of file request_queue_impl_qwqr.h.

Referenced by add_request(), and cancel_request().

queue_type stxxl::request_queue_impl_qwqr::m_write_queue
private

Definition at line 40 of file request_queue_impl_qwqr.h.

Referenced by add_request(), and cancel_request().


The documentation for this class was generated from the following files: