• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

syscall_file.h

00001 /***************************************************************************
00002  *  include/stxxl/bits/io/syscall_file.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2002 Roman Dementiev <[email protected]>
00007  *
00008  *  Distributed under the Boost Software License, Version 1.0.
00009  *  (See accompanying file LICENSE_1_0.txt or copy at
00010  *  http://www.boost.org/LICENSE_1_0.txt)
00011  **************************************************************************/
00012 
00013 #ifndef STXXL_SYSCALL_FILE_HEADER
00014 #define STXXL_SYSCALL_FILE_HEADER
00015 
00016 #include <stxxl/bits/io/ufs_file.h>
00017 #include <stxxl/bits/common/debug.h>
00018 
00019 
00020 __STXXL_BEGIN_NAMESPACE
00021 
00024 
00026 class syscall_file : public ufs_file_base
00027 {
00028 public:
00034     syscall_file(
00035         const std::string & filename,
00036         int mode,
00037         int disk = -1);
00038     request_ptr aread(
00039         void * buffer,
00040         stxxl::int64 pos,
00041         size_t bytes,
00042         completion_handler on_cmpl);
00043     request_ptr awrite(
00044         void * buffer,
00045         stxxl::int64 pos,
00046         size_t bytes,
00047         completion_handler on_cmpl);
00048 };
00049 
00051 class syscall_request : public ufs_request_base
00052 {
00053     friend class syscall_file;
00054 
00055 protected:
00056     syscall_request(
00057         syscall_file * f,
00058         void * buf,
00059         stxxl::int64 off,
00060         size_t b,
00061         request_type t,
00062         completion_handler on_cmpl);
00063     void serve();
00064 
00065 public:
00066     const char * io_type();
00067 };
00068 
00070 
00071 __STXXL_END_NAMESPACE
00072 
00073 #endif // !STXXL_SYSCALL_FILE_HEADER

Generated by  doxygen 1.7.1