31 char* cbuffer =
static_cast<char*
>(buffer);
43 " call=::lseek(fd,offset,SEEK_SET)" <<
44 " path=" << filename <<
46 " offset=" << offset <<
47 " buffer=" << cbuffer <<
49 " type=" << ((type == request::READ) ?
"READ" :
"WRITE") <<
53 if (type == request::READ)
57 if ((rc = ::read(file_des, cbuffer, (
unsigned int)bytes)) <= 0)
59 if ((rc = ::read(file_des, cbuffer, bytes)) <= 0)
65 " call=::read(fd,buffer,bytes)" <<
66 " path=" << filename <<
68 " offset=" << offset <<
69 " buffer=" << buffer <<
78 if (bytes > 0 && offset == this->_size())
82 memset(cbuffer, 0, bytes);
90 if ((rc = ::write(file_des, cbuffer, (
unsigned int)bytes)) <= 0)
92 if ((rc = ::write(file_des, cbuffer, bytes)) <= 0)
98 " call=::write(fd,buffer,bytes)" <<
99 " path=" << filename <<
100 " fd=" << file_des <<
101 " offset=" << offset <<
102 " buffer=" << buffer <<
103 " bytes=" << bytes <<
104 " type=" <<
"WRITE" <<
114 const char* syscall_file::io_type()
const
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]".
static const size_t bytes
number of bytes in uint_pair
request::offset_type offset_type
the offset of a request, also the size of the file
#define STXXL_END_NAMESPACE