DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

pl(D5)


pl -- interrupt priority levels for basic (spin) locks

Description

The pl values described here are used for the min_pl argument to lock allocating functions such as LOCK_ALLOC(D3) and RW_ALLOC(D3).

Usage

Implementations that do not require the interrupt priority level to be raised during lock acquisition may choose not to enforce the min_pl assertion, even when the appropriate compilation options have been defined. The valid values interrupt priority levels for basic locks are:


plbase
Block no interrupts

pltimeout
Block asynchronous callbacks such as from itimeout(D3) and bufcall(D3str).

pldisk
Block disk device interrupts.

plstr
Block STREAMS interrupts.

plhi
Block all interrupts.

The notion of a min_pl assumes a defined order of priority levels. The following partial order is defined:

   plbase < pltimeout <= pldisk,plstr <= plhi

The ordering of pldisk and plstr relative to each other is not defined.

Setting a given priority level will block interrupts associated with that level as well as any levels that are defined to be less than or equal to the specified level. In order to be portable a driver should not acquire locks at different priority levels where the relative order of those priority levels is not defined above.

The min_pl argument should specify a priority level that would be sufficient to block out any interrupt handler that might attempt to acquire this lock. In addition, potential deadlock problems involving multiple locks should be considered when defining the min_pl value. For example, if the normal order of acquisition of locks A and B (as defined by the lock hierarchy) is to acquire A first and then B, lock B should never be acquired at a priority level less than the min_pl for lock A. Therefore, the min_pl for lock B should be greater than or equal to the min_pl for lock A.

Note that the specification of min_pl with a LOCK_ALLOC(D3) or RW_ALLOC(D3) call does not actually cause any interrupts to be blocked upon lock acquisition. It simply asserts that subsequent LOCK calls to acquire this lock will pass in a priority level at least as great as min_pl.

Hardware applicability

All

Version applicability

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

LOCK_ALLOC(D3), RW_ALLOC(D3)

``Synchronization primitives'' in HDK Technical Reference
``IPLs (Interrupt Priority Levels)'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005