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

Detailed Description

Implementation of a local request queue having only one queue for both read and write requests, thus having only one thread.

Definition at line 30 of file request_queue_impl_1q.h.

+ Inheritance diagram for stxxl::request_queue_impl_1q:
+ Collaboration diagram for stxxl::request_queue_impl_1q:

Public Member Functions

 request_queue_impl_1q (int n=1)
 
 ~request_queue_impl_1q ()
 
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 ()
 

Private Types

typedef std::list< request_ptrqueue_type
 
typedef request_queue_impl_1q self
 

Static Private Member Functions

static void * worker (void *arg)
 

Private Attributes

queue_type m_queue
 
mutex m_queue_mutex
 
semaphore m_sem
 
thread_type m_thread
 
state< thread_statem_thread_state
 

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 34 of file request_queue_impl_1q.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void stxxl::request_queue_impl_1q::set_priority_op ( priority_op  op)
inlinevirtual

Reimplemented from stxxl::request_queue.

Definition at line 55 of file request_queue_impl_1q.h.

References stxxl::STXXL_UNUSED().

void * stxxl::request_queue_impl_1q::worker ( void *  arg)
staticprivate

Member Data Documentation

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

Definition at line 43 of file request_queue_impl_1q.h.

queue_type stxxl::request_queue_impl_1q::m_queue
private

Definition at line 37 of file request_queue_impl_1q.h.

Referenced by add_request(), and cancel_request().

mutex stxxl::request_queue_impl_1q::m_queue_mutex
private

Definition at line 36 of file request_queue_impl_1q.h.

Referenced by add_request(), and cancel_request().

semaphore stxxl::request_queue_impl_1q::m_sem
private
thread_type stxxl::request_queue_impl_1q::m_thread
private

Definition at line 40 of file request_queue_impl_1q.h.

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

state<thread_state> stxxl::request_queue_impl_1q::m_thread_state
private

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