Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/fifo_interface.h

Issue 1679643002: nacl_io: Add SOCK_DGRAM support to socketpair() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review feedback Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ 5 #ifndef LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
6 #define LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ 6 #define LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 namespace nacl_io { 11 namespace nacl_io {
12 12
13 // FIFOInterface 13 // FIFOInterface
14 // 14 //
15 // FIFOInterface provides a common interface for Emitters to update their 15 // FIFOInterface provides a common interface for Emitters to update their
16 // signalled state. FIFOs do not have any internal locking and instead 16 // signalled state. FIFOs do not have any internal locking and instead
17 // reply on a parent (usually an emitter) to lock for them as appropriate. 17 // reply on a parent (usually an emitter) to lock for them as appropriate.
18 class FIFOInterface { 18 class FIFOInterface {
19 public: 19 public:
20 virtual ~FIFOInterface() {}; 20 virtual ~FIFOInterface() {};
21 21
22 virtual bool IsEmpty() = 0; 22 virtual bool IsEmpty() = 0;
23 virtual bool IsFull() = 0; 23 virtual bool IsFull() = 0;
24 virtual bool Resize(size_t len) = 0; 24 virtual bool Resize(size_t len) = 0;
25 25
26 virtual size_t ReadAvailable() = 0; 26 virtual size_t ReadAvailable() = 0;
27 virtual size_t WriteAvailable() = 0; 27 virtual size_t WriteAvailable() = 0;
28 virtual size_t Read(void* buf, size_t len) = 0;
29 virtual size_t Write(const void* buf, size_t len) = 0;
28 }; 30 };
29 31
30 } // namespace nacl_io 32 } // namespace nacl_io
31 33
32 #endif // LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ 34 #endif // LIBRARIES_NACL_IO_FIFO_INTERFACE_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/fifo_char.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698