PipeFS


Contents


Introduction and Overview

PipeFS provides a mechanism for implementing named pipes between tasks, using the *PipeCopy command to move bytes from one pipe to another.

It calls OS_UpCall 6 if a pipe being read becomes empty, or if one being written to gets full, and thus cooperates with the Task Window.

It calls OS_UpCall 7 if an open pipe is closed or deleted. The Task Window module then traps this and objects (by returning an error) if any of its tasks are currently waiting for the poll word related to that pipe to become non-zero.

This prevents a *Shut command from deleting the workspace which is being accessed by the Task Window, which could potentially cause address exceptions. If the task which called PipeFS is killed by the user, the pipe can be released in a safe manner.

Before attempting to read data from a pipe you must first ensure that it contains data. The recommended way to do this is to call OS_GBPB 10.


*Commands


*PipeCopy

Copies a file one byte at a time to one or two output files
Syntax
*PipeCopy <source_file> <destination_file> [<destination_file2>]
Parameters
<source_file>- a valid pathname specifying a source file
<destination_file>- a valid pathname specifying a first destination file
<destination_file2>- a valid pathname specifying a second (optional) destination file
Use

*PipeCopy copies a file one byte at a time to one or two output files.

Example
*PipeCopy Pipe:Input Pipe:Output1 Pipe:Output2
Related * commands
*Copy

Document information

Maintainer(s): RISCOS Ltd <developer@riscos.com>
History:
RevisionDateAuthorChanges
1ROLInitial version
Disclaimer:

Copyright © Pace Micro Technolgy plc, 2002.
Portions copyright © RISCOS Ltd, 2002.
Published by RISCOS Limited.
No part of this publication may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, or stored in any retrieval system of any nature, without the written permission of the copyright holder and the publisher, application for which shall be made to the publisher.