Shared locks are employed for controlling a thread which extends across
more than one protocol layer in a data processing system. The use of a
counter is used as part of a data structure which makes it possible to
implement shared locks across multiple layers. The use of shared locks
avoids the processing overhead usually associated with lock acquisition
and release. The thread which is controlled may be initiated in either an
upper layer protocol or in a lower layer.