pTAL Reference Manual (H06.08+)

Data Alignment
HP pTAL Reference Manual523746-006
4-3
Misalignment Handling
Misalignment Handling
Misalignment handling is determined by the following SCF attributes, which are set
system-wide (that is, for all processors in the node) by the persons who configure the
system:
MISALIGNLOG
TNSMISALIGN (applies only to programs running in TNS mode or TNS
accelerated mode, and therefore, does not apply to pTAL programs)
NATIVEATOMICMISALIGN
MISALIGNLOG enables or disables the tracing facility (see Misalignment Tracing
Facility on page 4-1).
NATIVEATOMICMISALIGN applies to atomic routines in programs running in TNS/R
native mode; that is, the pTAL and TAL routines whose names begin with $ATOMIC_
For normal, nonatomic access in TNS/R native mode, the system uses the operands
full address (never rounded down) to complete the operation.
For normal, nonatomic access in TNS/R native mode, the system uses the operands
full address (never rounded down) to complete the operation.
Table 4-1 on page 4-3 lists and describes the possible settings for
NATIVEATOMICMISALIGN. Each setting represents a different misalignment handling
method. For more information about NATIVEATOMICMISALIGN, see the
SCF
Reference Manual for the Kernel Subsystem
.
The method that you choose does not apply to every misaligned address, only to those
that would have been rounded down in earlier RVUs.
Table 4-1. TNS/R Native Atomic Misalignment Handling Methods
Method Description
ROUND
(default)
After rounding down a misaligned address, the system proceeds to access
the address atomically, as in G06.16 and earlier RVUs.
FAIL Instead of rounding down a misaligned address, the system considers the
call to have failed.
This failure generates a SIGILL signal
(signal #4). By default, this signal
causes process termination, but the program can specify other behavior (for
example, entering the debugger or calling a specified signal-handler
procedure). The signal cannot be ignored. For information about signal
handling, see the explanation of the sigaction() function in the
Open
System Services System Calls Reference Manual
.
Note. ROUND misalignment handling is intended as a temporary solution, not as a substitute
for changing your atomic calls to ensure that they have only aligned addresses. ROUND
misalignment handling cannot be migrated to past and future NonStop OS platforms
.