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

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

Issue 73083005: [NaCl SDK] Enable linux host build for nacl_io and nacl_io_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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_NULL_H_ 5 #ifndef LIBRARIES_NACL_IO_FIFO_NULL_H_
6 #define LIBRARIES_NACL_IO_FIFO_NULL_H_ 6 #define LIBRARIES_NACL_IO_FIFO_NULL_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 // FIFONull 13 // FIFONull
14 // 14 //
15 // A null fifo is always ready to read or write, but never actually 15 // A null fifo is always ready to read or write, but never actually
16 // provides or stores data. 16 // provides or stores data.
17 class FIFONull : public FIFOInterface { 17 class FIFONull : public FIFOInterface {
18 public: 18 public:
19 virtual bool IsEmpty() { return false; } 19 virtual bool IsEmpty() { return false; }
20 virtual bool IsFull() { return false; } 20 virtual bool IsFull() { return false; }
21 virtual bool Resize(size_t) { return false; } 21 virtual bool Resize(size_t) { return false; }
22 22
23 virtual uint32_t ReadAvailable() { return 1; } 23 virtual size_t ReadAvailable() { return 1; }
24 virtual uint32_t WriteAvailable() { return 1; } 24 virtual size_t WriteAvailable() { return 1; }
25 }; 25 };
26 26
27 } // namespace nacl_io 27 } // namespace nacl_io
28 28
29 #endif // LIBRARIES_NACL_IO_FIFO_NULL_H_ 29 #endif // LIBRARIES_NACL_IO_FIFO_NULL_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/fifo_interface.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698