.th seg_stat_block IIa 4/21/86
.sh NAME
seg_stat_block \- segment status block
.sh SYNOPSIS
.nf
 seg_stat_block = RECORD

       mem_lock     : boolean;   
       mem_advise   : boolean;   
       swap_lock    : boolean;   
       sharable     : boolean;   
       growth       : direction; 
       stat_size    : seg_size;  
       stat_seid    : seid;      
       stat_des     : seg_des;   
       stat_mapped  : boolean;   
       stat_acc     : acc_mode;  
       stat_loc     : virt_loc;  
 END;
.fi
.sh DESCRIPTION
.i7
Fields marked with an asterisk (*) are read only.
Fields marked with a double asterisk (**) are read only while
mapped in.
.s3
.lp 18 13
mem_lock     is true if a segment is locked into memory (may not be swapped out).
The privilege
privLockSeg
is required to lock a segment into memory.
.s3
.lp 18 13
mem_advise   is true if the segment is liable to be locked down in memory.
I/O segments should be given this attribute by user programs.
.s3
.lp 18 13
swap_lock    is true
if the segment is locked into swap space (sticky: must not be deleted).
The privilege
privStickySeg
is required to lock a segment into swap space.
.s3
.lp 18 13
sharable     is true if the segment may be shared with other processes.
A segment`s discretionary access controls
whether it is sharable.  A sharable segment
cannot
have its global attributes changed.  For example, once a
segment is shared, it cannot be made unsharable.
However, it can still be mapped anywhere in a process's address space.
.s3
.lp 18 13
growth       indicates the growth direction of the segment, up is false
(all bits off) and down is true (all bits on).
A downward-growing segment starts at a high
memory address and ends at a low memory address.  Its virtual
address must be the high byte address ( i.e. the address is odd).
An upward growing segment starts at a low
memory address and ends at high memory address.  Its virtual
address must be the low byte address( i.e. the address is even).
.s3
.lp 18 13
*stat_size   is the length of the segment in bytes.
This must be a multiple of 512.
.s3
.lp 18 13
*stat_seid   is the segment's seid.
.s3
.lp 18 13
*stat_des    is the segment's open descriptor (process-local segment number).
.s3
.lp 18 13
*stat_mapped is true if the segment is currently mapped into the process's address
space.
.s3
.lp 18 13
**stat_acc   is the access allowed the calling process to a segment.
The access allowed must always be a subset of the access allowed this
process by the tii of the segment.
.s3
.lp 18 13
**stat_loc   is the last known virtual location
(in the process's address space) of a segment.
If the segment is upward-growing, this address must be a
multiple of 64; if downward-growing, this address must be
one less than a multiple of 64.
.i0
.sh "SEE ALSO"
K_build_segment (II),
K_get_segment_status (II),
K_set_segment_status (II),
priv_struct (IIa),
tii_struct (IIa),
seid(IIa),
acc_mode(IIa),
virt_loc(IIa)
