-*-Indented-Text-*-

Design Notes
------------

Conventions for new OS interface:

Files that define OS-independent interfaces: "os${FOO}.h"
Files that define OS-dependent interfaces: "ux${FOO}.h"
OS-dependent implementations: "ux${FOO}.c"
OS-independent implementations: "os${FOO}.c"
Files that implement OS-independent primitives: "pros${FOO}.c"
Files that implement OS-dependent primitives: "prux${FOO}.c"

Common OS-indendent definitions: "os.h"
Common OS-dependent definitions: "ux.h"
OS-dependent system-call support: "ux.c"

The operating-system interface is divided into three layers: System,
OS, and Primitive.  The OS layer is built on the System layer, and the
Primitive layer is built on the OS layer.

1. System layer implements basic operating-system calls.  This layer
should know nothing about Scheme.  Names in the interface between this
and the OS layer begin with "UX_".

2. OS layer implements OS-independent and OS-dependent procedures
meant to be invoked directly from primitive procedures.  This layer
has limited knowledge of Scheme: it is permitted to interact with
Scheme by calling procedures, for example to signal errors or
interrupts, but may not know about Scheme's datatypes.  Names in the
interface between this and the Primitive layer begin with "OS_".

3. Primitive layer implements Scheme primitives.  This layer has full
knowledge of Scheme.  Names in the interface between this and the
Scheme layer begin with "Prim_".

Implementation Notes
--------------------

Major work left:

    * Synchronous subprocesses, subprocess CTTY types: none,
    inherited.

    * Change system-call names from strings to enumeration.  Implement
    `error_system_call' properly; perhaps also implement error
    procedure that passes an arbitrary string to Scheme.

Minor work left:

    * Pixel has no directory library; see DIR(5).

    * Figure out how to do `ENABLE_SUBPROCESSES' conditionalization,
    but do `DISABLE_SUBPROCESSES' instead, so the default is to have
    them.

    * Various things need to be reset when a soft or hard reset is performed.
    Such as: `scratch_obstack'.

    * In `UX_dump_core', guarantee that SIGABRT is unmasked.

Notes:

    * When implementing process_ctty_type_inherited, if job control is
    available and enabled (i.e. the stop signals are not SIG_IGN when
    Scheme starts), Scheme must set the stop signals to SIG_DFL before
    starting the subprocess.
