.th K_unlock II 4/21/86
.sh NAME
K_unlock \- release a segment from exclusive use
.sh "MODULA SYNOPSIS"
.nf
 CONST seg: seg_des;
 VAR status: K_err_num;
 ...
 status := NK_unlock(seg);
.sp
.sh "C SYNOPSIS"
 seg_des seg;
 int status;
 ...
 status = K_unlock(seg);
.sp
.fi
.sh DESCRIPTION
K_unlock is used to release a segment which has previously been locked
for exclusive access by K_lock (II).  The next process waiting to lock
the segment (if any) is woken up.
.s3
The segment is unlocked automatically if the locking process releases
the segment (see K_release_segment (II)) or if the process goes away
(see K_release_process (II)).
.sh EXCEPTIONS
.lp 22 15
XnSgDes		Not a segment descriptor:  This number is outside the set of
segment descriptors.
.lp 22 15
XbSgDes		Bad segment descriptor:  this segment descriptor is inactive.
.lp 22 15
XnotLocked	Not locked:  the segment is not currently locked by
the calling process.
.i0
.sh "SEE ALSO"
K_lock(II), K_release_process(II), K_release_segment(II)
