Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ | |
| 6 #define LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 #include <stdlib.h> | |
| 10 | |
| 11 namespace nacl_io { | |
| 12 | |
| 13 // FIFOInterface | |
| 14 // | |
| 15 // FIFOInterface provides a common interface for Emitters to update thier | |
|
binji
2013/09/15 22:18:58
sp: their
noelallen1
2013/09/17 21:21:54
Done.
| |
| 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. | |
| 18 class FIFOInterface { | |
| 19 public: | |
| 20 virtual ~FIFOInterface() {}; | |
| 21 | |
| 22 virtual bool IsEmpty() = 0; | |
| 23 virtual bool IsFull() = 0; | |
| 24 virtual bool Resize(size_t len) = 0; | |
| 25 | |
| 26 virtual uint32_t ReadAvailable() = 0; | |
| 27 virtual uint32_t WriteAvailable() = 0; | |
| 28 }; | |
| 29 | |
| 30 } // namespace nacl_io | |
| 31 | |
| 32 #endif // LIBRARIES_NACL_IO_FIFO_INTERFACE_H_ | |
| OLD | NEW |