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.
9 #include "nacl_io/event_emitter_pipe.h"
13 EventEmitterPipe::EventEmitterPipe(size_t size)
14 : fifo_(std::max<size_t>(1, size)) {
15 UpdateStatus_Locked();
18 size_t EventEmitterPipe::Read_Locked(char* data, size_t len) {
19 size_t out_len = fifo_.Read(data, len);
21 UpdateStatus_Locked();
25 size_t EventEmitterPipe::Write_Locked(const char* data, size_t len) {
26 size_t out_len = fifo_.Write(data, len);
28 UpdateStatus_Locked();
32 } // namespace nacl_io