| // 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. |
| |
| // !!! THIS FILE IS NOT YET USED !!! |
| // See //zircon/system/public/zircon/syscalls.banjo. |
| // !!! THIS FILE IS NOT YET USED !!! |
| |
| library zz; |
| |
| [Transport="Syscall"] |
| protocol Fifo { |
| /// Create a fifo. |
| [Out1="handle<fifo>:acquire", |
| Out2="handle<fifo>:acquire"] |
| Create(usize elem_count, usize elem_size, uint32 options) -> |
| (status status, handle<fifo> out0, handle<fifo> out1); |
| |
| // TODO(scottmg): Size of |data| is tricky here! In particular it's a |
| // elem_size * count large as if it were data<T> where sizeof(T) == elem_size. |
| /// Read data from a fifo. |
| [In0="handle<fifo>:rights=READ", |
| In2="mutable<vector<byte>>", |
| Out1="optional<usize>"] |
| Read(handle<fifo> handle, usize elem_size, vector<byte> data) -> |
| (status status, usize actual_count); |
| |
| // TODO(scottmg): Same as above for size of |data|. |
| /// Write data to a fifo. |
| [In0="handle<fifo>:rights=WRITE", |
| Out1="optional<usize>"] |
| Write(handle<fifo> handle, usize elem_size, vector<byte> data) -> |
| (status status, usize actual_count); |
| }; |