.th K_set_segment_status II 4/21/86
.sh NAME
K_set_segment_status - set memory segment specific attributes
.sh "MODULA SYNOPSIS"
.nh
.na
 CONST segSeid: seid;
.br
 CONST status: seg_stat_block;
.br
 CONST choice: selector;
.br
 VAR stat: K_err_num;
.br
 . . .
.br
 stat := NK_set_segment_status(segSeid, status, choice);
.br
.hy
.ad
.sp
.sh "C SYNOPSIS"
.nh
.na
 seid segSeid;
.br
 seg_stat_block status;
.br
 selector choice;
.br
 int stat;
.br
 . . .
.br
 stat = K_set_segment_status (segSeid, &status, choice);
.br
.hy
.ad
.sh DESCRIPTION
K_set_segment_status supports modification of the type dependent
information of a segment.  The invoking process must have the appropriate
privilege in order to modify the "sticky" flag or the "lock" flag.

The selector bit positions within the choice parameter are:

.nf

	segset_mem_lock      01
	segset_mem_advise    02
	segset_swap_lock     04
	segset_sharable     010
	segset_stat_acc     020
	segset_stat_loc     040

.fi

.sh EXCEPTIONS
.lp 22 15
XbdSgDes	Bad segment descriptor. Segment not available to process.
.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
XnPrLkSg	Process needs PrivLockSeg to lock segment in memory.
.lp 22 15
XnpvStkSeg	Process needs PrivStickySeg to make segment "sticky"
.lp 22 15
XsgMap	Segment not mapped into process virtual address space.
.lp 22 15
XshSg	Segment is shared. Attributes cannot be changed.
.i0
.sh "SEE ALSO"
K_get_segment_status(II),
K_set_process_status(II),
seg_stat_block(IIa),
selector(IIa)
