Use Vlinder::Atomics
[Arachnida.git] / lib / Spin / Private / Pipe.h
blobaa2310e4d6aaa60049e01133ec327dc821fe0b82
1 #ifndef _spin_private_pipe_h
2 #define _spin_private_pipe_h
4 #include "../Details/prologue.h"
5 #include <cstddef>
7 namespace Spin
9 namespace Private
11 class SPIN_API Pipe
13 public :
14 Pipe();
15 ~Pipe();
17 int getReadDescriptor() const { return fds_[0]; }
18 int getWriteDescriptor() const { return fds_[1]; }
20 std::size_t read(void * buffer, std::size_t count);
21 void write(const void * buffer, std::size_t count);
23 private :
24 Pipe(const Pipe&);
25 Pipe & operator=(const Pipe&);
27 int fds_[2];
32 #endif