Solaris DDI specific (Solaris DDI).
For the purpose of restricting and controlling the concurrency in drivers/modules, we define the concepts of inner and outer perimeters. A driver/module can be configured either to have no perimeters, to have only an inner or an outer perimeter, or to have both an inner and an outer perimeter. Each perimeter acts as a readers-writers lock, that is, there can be multiple concurrent readers or a single writer. Thus, each perimeter can be entered in two modes: shared (reader) or exclusive (writer). The mode depends on the perimeter configuration and can be different for the different STREAMS entry points (open(9E) , close(9E) , put(9E) , or srv(9E) ).
The concurrency for the different entry points is (unless specified otherwise) to enter with exclusive access at the inner perimeter (if present) and shared access at the outer perimeter (if present).
The perimeter configuration consists of flags that define the presence and scope of the inner perimeter, the presence of the outer perimeter (which can only have one scope), and flags that modify the default concurrency for the different entry points.
All MT safe modules/drivers specify the D_MP flag.
The default concurrency can be modified using:
The module/driver can use qwait(9F) or qwait_sig() in the open(9E) and close(9E) procedures if it needs to wait "outside" the perimeters.
The module/driver can use qwriter(9F) to upgrade the access at the inner or outer perimeter from shared to exclusive.
The use and semantics of qprocson() and qprocsoff(9F) is independent of the inner and outer perimeters.