blob: 0e9ee212953e257912f782043a80640841084bd6 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(fxb/39732): This should be read as "library zx".
library zz;
[Transport = "Syscall"]
protocol fifo {
/// Create a fifo.
fifo_create(usize elem_count, usize elem_size, uint32 options)
-> (status status, handle<fifo> out0, handle<fifo> out1);
/// Read data from a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_READ.
fifo_read(handle<fifo> handle, usize elem_size)
-> (status status, vector_void data, optional_usize actual_count);
/// Write data to a fifo.
/// Rights: handle must be of type ZX_OBJ_TYPE_FIFO and have ZX_RIGHT_WRITE.
fifo_write(handle<fifo> handle, usize elem_size, const_voidptr data, usize count)
-> (status status, optional_usize actual_count);
};