Classes | Modules | Defines | Functions

I/O primitives layer

Collaboration diagram for I/O primitives layer:

Classes

class  disk_queues
 Encapsulates disk queues. More...
class  file
 Defines interface of file. More...
class  stats
 Collects various I/O statistics. More...
class  request
 Request with basic properties like file and offset. More...
class  request_interface
 Functional interface of a request. More...
class  request_ptr
 Implemented as reference counting smart pointer. More...
class  serving_request
 Request which serves an I/O by calling the synchronous routine of the file. More...

Modules

 File implementations

Defines

#define BLOCK_ALIGN   4096
#define STXXL_VERBOSE_request_ptr(msg)   STXXL_VERBOSE3("[" << static_cast<void *>(this) << "] request_ptr::" << msg << " ptr=" << static_cast<void *>(ptr))
 A smart wrapper for request pointer.

Functions

std::ostream & operator<< (std::ostream &o, const stats_data &s)
std::ostream & operator<< (std::ostream &o, const stats &s)
std::string format_with_SI_IEC_unit_multiplier (uint64 number, const char *unit="", int multiplier=1000)
std::string add_IEC_binary_multiplier (uint64 number, const char *unit="")
std::string add_SI_multiplier (uint64 number, const char *unit="")
std::ostream & operator<< (std::ostream &out, const request &req)
template<class request_iterator_ >
void wait_all (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Collection of functions to track statuses of a number of requests.
void wait_all (request_ptr req_array[], int count)
 Suspends calling thread until all given requests are completed.
template<class request_iterator_ >
std::iterator_traits
< request_iterator_ >
::difference_type 
cancel_all (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Cancel requests The specified requests are canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.
template<class request_iterator_ >
request_iterator_ poll_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Polls requests.
bool poll_any (request_ptr req_array[], int count, int &index)
 Polls requests.
template<class request_iterator_ >
request_iterator_ wait_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Suspends calling thread until any of requests is completed.
int wait_any (request_ptr req_array[], int count)
 Suspends calling thread until any of requests is completed.

Detailed Description

Group of classes which enable abstraction from operating system calls and support system-independent interfaces for asynchronous I/O.


Define Documentation

#define STXXL_VERBOSE_request_ptr (   msg  )     STXXL_VERBOSE3("[" << static_cast<void *>(this) << "] request_ptr::" << msg << " ptr=" << static_cast<void *>(ptr))

A smart wrapper for request pointer.

Referenced by request_ptr::operator=(), request_ptr::request_ptr(), and request_ptr::~request_ptr().


Function Documentation

template<class request_iterator_ >
std::iterator_traits<request_iterator_>::difference_type cancel_all ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Cancel requests The specified requests are canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.

Parameters:
reqs_begin begin of request sequence
reqs_end end of request sequence
Returns:
number of request canceled
Examples:
io/test_cancel.cpp.
bool poll_any ( request_ptr  req_array[],
int  count,
int &  index 
) [inline]

Polls requests.

Parameters:
req_array array of request_ptr objects
count size of req_array
index contains index of the first completed request if any
Returns:
true if any of requests is completed, then index contains valid value, otherwise false

References poll_any().

template<class request_iterator_ >
request_iterator_ poll_any ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Polls requests.

Parameters:
reqs_begin begin of request sequence to poll
reqs_end end of request sequence to poll
index contains index of the first completed request if any
Returns:
true if any of requests is completed, then index contains valid value, otherwise false

Referenced by poll_any().

void wait_all ( request_ptr  req_array[],
int  count 
) [inline]

Suspends calling thread until all given requests are completed.

Parameters:
req_array array of request_ptr objects
count size of req_array

References wait_all().

template<class request_iterator_ >
void wait_all ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Collection of functions to track statuses of a number of requests.

Suspends calling thread until all given requests are completed

Parameters:
reqs_begin begin of request sequence to wait for
reqs_end end of request sequence to wait for
Examples:
io/test_cancel.cpp, io/test_io.cpp, io/test_io_sizes.cpp, and mng/test_mng.cpp.

Referenced by stream::check_sorted_runs(), ksort(), and wait_all().

int wait_any ( request_ptr  req_array[],
int  count 
) [inline]

Suspends calling thread until any of requests is completed.

Parameters:
req_array array of request_ptr objects
count size of req_array
Returns:
index in req_array pointing to the first completed request

References wait_any().

template<class request_iterator_ >
request_iterator_ wait_any ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
)

Suspends calling thread until any of requests is completed.

Parameters:
reqs_begin begin of request sequence to wait for
reqs_end end of request sequence to wait for
Returns:
index in req_array pointing to the first completed request

Referenced by buffered_writer< block_type >::get_free_block(), write_pool< BlockType >::steal(), and wait_any().