Sun S3L 3.0 Programming and Reference Guide

Selecting a Safety Mechanism Level

You can select the desired S3L safety mechanism level in either of two ways:

These methods are described in " Setting the Sun S3L Safety Environment Variable"and " Setting the Safety Level from Within a Program".

Setting the Sun S3L Safety Environment Variable

The S3L_SAFETY environment variable takes a single argument, which can be the integer 0, 2, 5, or 9. For example, to select the highest level, enter:

% setenv S3L_SAFETY 9

One advantage of using the S3L_SAFETY environment variable is that you can set or change the safety level without recompiling your code.

Setting the Safety Level from Within a Program

To set the Sun S3L safety level from within your program, include the following subroutine call. Specify the desired level in the integer argument n:

To see what Sun S3L safety level is currently in effect, include the following call. Again, specify the level of interest in the integer argument n:

The advantage of using these calls from within a program is that you can set or obtain the safety level at any point within your code. However, you must recompile the code each time you change these calls.