Specifications
System Macros Invoked by Drivers
FUNCTAB
FUNCTAB
Creates a driver’s function decision table (FDT) and generates FDT entries.
Format
FUNCTAB [action] ,codes
Parameters
[action]
Address of an FDT routine that the operating system calls when preprocessing
an I/O request whose function code matches a function indicated in the codes
argument. A plus sign (+) precedes the address of any specified FDT routine
that is part of the operating system. No plus sign precedes the address of an FDT
routine that is contained within the driver module.
You cannot specify an action argument in a driver’s first two invocations of the
FUNCTAB macro.
codes
List of I/O function codes that system preprocessing services by calling the FDT
routine specified in the action argument of the FUNCTAB macro invocation.
The macro expansion prefixes each code with the string IO$_; for example,
READVBLK expands to IO$_READVBLK.
Description
A device driver uses several invocations of the FUNCTAB macro to generate the
three components of a function decision table:
• The list of valid I/O function codes
• The list of buffered I/O function codes
• One or more FDT entries
The first two invocations of the FUNCTAB macro in a driver generate the lists
of valid I/O functions and buffered I/O functions, respectively. These invocations
include the codes argument, but not the action argument. If no buffered I/O
functions are defined for the device, the codes argument to the second invocation
of the FUNCTAB macro specifies an empty list.
Each succeeding invocation of the FUNCTAB macro generates an FDT entry.
Each FDT entry specifies all or a subset of the valid I/O function codes and the
address of an FDT routine that performs I/O preprocessing for those function
codes. You can specify any valid I/O function code in more than one of these
FUNCTAB macro invocations, thus causing more than one FDT routine to be
called for a single valid I/O function code.
2–37