RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

FileSwitch Miscellaneous Information

Programmer's Reference Manuals
» Part 4 – Using Filing Systems
» FileSwitch
» Technical Details
» Miscellaneous Information

Miscellaneous Information

Re-entrancy and Interrupts

The FileSwitch module can handle recursive calls made to different streams, via the same or different entry points.

For example, two different file are to be accessed using; file 1 is an output file on a disc that is no longer valid, and file 2 is a spool file.

  1. Call OS_BPut to put a byte to file 1 (this fills the buffer and causes it to flush to the filing system)
  2. The filing system generates an UpCall to inform that the medium is missing
  3. An UpCall handler asks the user to supply the missing medium (if possible)
  4. This goes through OS_BPut to file 2, filling the buffer and causing a flush to the filing system

If the filing systems are different then both calls will work as expected. If, however, they are the same, then it is the responsibility of the filing system to decide whether it can handle it. Filing systems that use the FileCore module do not.

Filing systems must not be called from interrupt code. An error may/or may not be given.

Filing System Support of SWI Calls

As a system may use different filing systems, applications must be written to handle situations where a filing system may not support a command that other filing system do support. In this instance, an error will be returned, and it is the responsibility of the application to handle it.

System Devices

In addition to true filing system used to store information, other device-orientated systems are assigned like a filing system. These are called System Devices?. They can be used anywhere that require a file name as an input, or destination for output, using a method called redirection. The SystemDevices module is responsible for providing these devices.

System Devices suitable for input
kbd: The keyboard, reading a line at a time using OS_ReadLine
rawkbd: The keyboard, reading a character at a time using OS_ReadC
null: The ‘null device’, which effectively gives no input
System Devices suitable for Output
vdu: The screen, using GSRead format passed to OS_WriteC
rawvdu: The screen, via the VDU drivers and OS_WriteC
printer: The currently configured printer
netprint: The currently configured printer, provided by the NetPrint module
null: The ‘null device’, which effectively gives no output

Note: An error is given if the specified system device is not present. e.g the SystemDevices module is not present.

More information is available in the System Devices? section.

Additional information

Other filing systems may store extra information not detailed here, with each file. To find out more, you should consult the documentation provided with the filing system.

Created on November 6, 2009 15:11:57 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: FileSwitch Technical Details

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys