Free Serialization on Shared Memory

Releases a shared memory block serialization that was
previously obtained with Int 31H Fn 0D02H.

Call With:

AX = 0D03H
SI:DI = shared memory block handle
DX = option flags
Bit Significance
0 0 = release exclusive serialization
1 = release shared serialization
1 0 = don't free pending serialization
1 = free pending serialization (see Note)
2-15 reserved, must be zero

Returns:

if function successful
Carry flag= clear

if function unsuccessful
Carry flag= set
AX = error code
8002H invalid state (client does not own a
successful serialization of the specified
type)
8023H invalid handle

Notes:

o For each client, the DPMI host maintains four different
local (virtual machine) serialization counts (exclusive,
shared, pending shared, and pending exclusive) for each
shared memory block, as well as a global serialization
count. The global serialization count is only updated
when the sum of a virtual machine's exclusive and shared
serialization counts goes from 0 to 1 (serialize) or 1 to
0 (free).
o A client's interrupt handler can call this function with
bit 1 of DX set to cancel a serialization request that
has suspended the main thread of execution of the same
client. In such cases, the original serialization
request will return with the Carry flag set and AX =
8005H.