Stxxl  1.2.1
syscall_file.h
1 /***************************************************************************
2  * include/stxxl/bits/io/syscall_file.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
5  *
6  * Copyright (C) 2002 Roman Dementiev <dementiev@mpi-sb.mpg.de>
7  *
8  * Distributed under the Boost Software License, Version 1.0.
9  * (See accompanying file LICENSE_1_0.txt or copy at
10  * http://www.boost.org/LICENSE_1_0.txt)
11  **************************************************************************/
12 
13 #ifndef STXXL_SYSCALL_FILE_HEADER
14 #define STXXL_SYSCALL_FILE_HEADER
15 
16 #include <stxxl/bits/io/ufs_file.h>
17 #include <stxxl/bits/common/debug.h>
18 
19 
20 __STXXL_BEGIN_NAMESPACE
21 
24 
27 {
28 public:
35  const std::string & filename,
36  int mode,
37  int disk = -1);
39  void * buffer,
40  stxxl::int64 pos,
41  size_t bytes,
42  completion_handler on_cmpl);
44  void * buffer,
45  stxxl::int64 pos,
46  size_t bytes,
47  completion_handler on_cmpl);
48 };
49 
52 {
53  friend class syscall_file;
54 
55 protected:
57  syscall_file * f,
58  void * buf,
59  stxxl::int64 off,
60  size_t b,
61  request_type t,
62  completion_handler on_cmpl);
63  void serve();
64 
65 public:
66  const char * io_type();
67 };
68 
70 
71 __STXXL_END_NAMESPACE
72 
73 #endif // !STXXL_SYSCALL_FILE_HEADER