RISCOS.com

www.riscos.com Technical Support:
Programmer's Reference Manual

 

PipeFS


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 (see 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 (see 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 (OS_GBPB 9, 10, 11 and 12).

* Commands


*PipeCopy

Copies a file one byte at a time to one or two output files

Syntax

*PipeCopy source_file destination_file1 [destination_file2]

Parameters

source_file - a valid pathname specifying a source file
destination_file1 - 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

Related SWIs

None

Related vectors

None

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015