30 assert(req->get_file() ==
this);
32 char* buffer =
static_cast<char*
>(req->get_buffer());
46 " call=::lseek(fd,offset,SEEK_SET)" <<
47 " path=" << filename <<
49 " offset=" << offset <<
50 " buffer=" << (
void*)buffer <<
52 " type=" << ((type == request::READ) ?
"READ" :
"WRITE") <<
56 if (type == request::READ)
60 if ((rc = ::read(file_des, buffer, (
unsigned int)bytes)) <= 0)
62 if ((rc = ::read(file_des, buffer, bytes)) <= 0)
68 " call=::read(fd,buffer,bytes)" <<
69 " path=" << filename <<
71 " offset=" << offset <<
72 " buffer=" << (
void*)buffer <<
81 if (bytes > 0 && offset == this->_size())
85 memset(buffer, 0, bytes);
93 if ((rc = ::write(file_des, buffer, (
unsigned int)bytes)) <= 0)
95 if ((rc = ::write(file_des, buffer, bytes)) <= 0)
101 " call=::write(fd,buffer,bytes)" <<
102 " path=" << filename <<
103 " fd=" << file_des <<
104 " offset=" << offset <<
105 " buffer=" << (
void*)buffer <<
106 " bytes=" << bytes <<
107 " type=" <<
"WRITE" <<
117 const char* syscall_file::io_type()
const
static const int bytes
number of bytes in uint_pair
request::size_type size_type
the size of a request
Aquire a lock that's valid until the end of scope.
#define STXXL_BEGIN_NAMESPACE
static uint_pair max()
return an uint_pair instance containing the largest value possible
#define STXXL_THROW_ERRNO(exception_type, error_message)
Throws exception_type with "Error in [function] : [error_message] : [errno message]".
request::offset_type offset_type
the offset of a request, also the size of the file
Request with basic properties like file and offset.
#define STXXL_END_NAMESPACE