Chapter Contents |
Previous |
Next |
User-Added Signals |
The SAS/C Library enables you to add
new user signals in two ways. If you want to raise a user signal within your
program to indicate an unusual or error condition, you can use the
raise
or
siggen
function. This type of user signal requires no special coding,
only the use of these two functions. The default action for a user signal
raised in this manner is always to ignore the signal. Refer to the descriptions
of the
raise
and
siggen
functions for more information.
If, however, you want to raise a signal as a result of a software interrupt (such as an end-of-subtask notification) or a hardware interrupt (such as an I/O interrupt), you can do so by coding two or more routines to intercept these interrupts and make them known to the library. The first of the required routines, called the initialization routine, defines the signal to the library. The other required routine, called the signal-generating routine, is an operating system exit that is invoked to raise the signal for the library when the interrupt occurs. Both of these routines are normally written in assembler language. Most of the other routines that define how to handle the signal can be written in either C or assembler language. Routines for Adding Signals indicates the recommended language for each routine and describes how to write the routines that add user signals to the library.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.