lock(lockname)
unlock(lockname)
lock
on lockname
, Rdsm will
check whether lockname
is locked. If the lock is unlocked,
lock
will immediately return. If on
the other hand the variable is locked, this client will join the queue
for the lock, and its call to lock
will block.When a client calls unlock
, the call will immediately return.
lock
made previously by the new head of the queue will now
return.
One does not use newdsm
to create a lock variable. Instead, the
variable is automatically created the first time lock
is called
on it.
barr
,
wait
,
signal
,
fa