When a requestor calls the Latch_Obtain service to request ownership
of a latch, the latch manager cannot grant control of the latch immediately
if contention exists because either:
- Exclusive ownership of the latch was requested
(Latch_Obtain was called with an access option of ISGLOBT_EXCLUSIVE,
value of 0), and an exclusive or shared request (either owned or pending)
already exists for the latch
- Shared ownership of the latch was requested,
(Latch_Obtain was called with an access option of ISGLOBT_SHARED,
value of 1), and an exclusive request (either owned or pending) already
exists for the latch.
When either situation occurs, the value specified on the obtain_option
parameter indicates how the latch manager is to handle the request,
which is one of the following:
- ISGLOBT_SYNC (value of 0): Queue the request
and suspend the requestor; when the latch manager eventually grants
ownership of the latch to the requestor, return control to the requestor
- ISGLOBT_COND (value of 1): Do not queue
the request; return control to the requestor
- ISGLOBT_ASYNC_ECB (value of 2): Queue the
request and return control to the requestor; post an ECB when the
latch manager eventually grants ownership of the latch to the requestor.