.th K_rendezvous_segment II 4/21/86
.sh NAME
K_rendezvous_segment - gain access to a shared memory segment
.sh "MODULA SYNOPSIS"
.nh
.na
 CONST segSeid: seid;
.br
 CONST location: virt_loc;
.br
 CONST access: acc_mode;
.br
 VAR segDes: seg_des;
.br
 VAR stat: K_err_num;
.br
 . . .
.br
 stat := NK_rendezvous_segment(segSeid, location, access, segDes);
.br
.hy
.ad
.sp
.sh "C SYNOPSIS"
.nh
.na
 seid segSeid;
.br
 virt_loc location;
.br
 acc_mode access;
.br
 seg_des segDes;
.br
 int stat;
.br
 . . .
.br
 stat = K_rendezvous_segment (segSeid, location, access, &segDes);
.br
.hy
.ad
.sh DESCRIPTION
The Kernel call K_rendezvous_segment is the mechanism by which
processes are able to share segments.  If the segment requested exists
and is accessible, it is mapped into the processes address space as
requested, providing that the requested mapping information is valid.
The Kernel will check that the segment may be mapped into the process
issuing the K_rendezvous_segment call.  The checks include:
.sp
    \(bu  that the segment seid is active
.sp
    \(bu  that the segment may be shared
.sp
    \(bu  that the security/integrity level of the process allows it to access the segment
.sp
    \(bu  that the discretionary access for the segment allows it to be accessed in the requested way
.sp
    \(bu  that the virtual address supplied is valid

.sp
.sh EXCEPTIONS
.lp 22 15
XbSgRng        Bad segment range:  set of addresses specified for the segment
would lie outside a 64 K address space.
.lp 22 15
XbSgSd         Bad segment seid:  segSeid is not the seid of an existing
segment or process does not have mandatory (security) access to the segment.
.lp 22 15
XdupSg         Duplicate segment:  some process-local segment descriptor
is already attached to the segment.
.lp 22 15
XncnDo         Cannot do:  global resource exhaustion. (LEAK)
.lp 22 15
XnPgSg         No page in segment:  segment address range does not cross or is not
adjacent to some multiple of 8 K (address range must include an 8K multiple or
have top address that one less than an 8K multiple).
.lp 22 15
XpostEh        Process open segment table exhaustion:  too many process
segments. (LEAK)
.lp 22 15
XsgNoAcc       Segment no access:  discretionary access of the segment
does not allow the requested access.
.lp 22 15
XvrtMmCfl      Virtual memory conflict:  some subset of the address range
of this segment would use a page register(s) already in use by an existing
segment (high-order three bits the same).
.i0
.sh "SEE ALSO"
K_build_segment(II),
K_release_segment(II),
K_remap(II),
acc_mode(IIa),
seid(IIa),
virt_loc(IIa)
