F.CBSY - produce a common busy count representation.

Usage:

%b/manif/busy
   ...
counts = f.cbsy(busyvec, type2blk);

Where:

busyvec
is a vector of at least MAX_BUSY words where the busy counts will be stored.
type2blk
is a pointer to the FMS type 2 block for the file being examined.
counts
is the number of words stored in "busyvec". If zero, the file is not currently accessed.

Description:

F.CBSY is used to arrange the busy count information from the 7 busy count words of a file descriptor block (words .H2BSY to .H2BSY+6) into a normalized form. The busy count words returned in "busyvec" are formatted:

bits 0-3
zero
bits 4-5
System number where file is accessed
bits 6-8
TSS number where file is accessed. Zero for batch.
bits 9-17
Access type code
0 B_QUERY
Query readers.
1 B_READC
Concurrent readers.
2 B_READ
Non-concurrent readers.
3 B_WRITEC
Concurrent writers.
4 B_WRITE
Private writers.
bits 18-35
Count of file users of the type specified in bits 9-17.

Since there are only 7 busy words, and a file can be accessed in at most 3 ways at once, F.CBSY never returns more than 21 (MAX_BUSY) words.

The file B/MANIF/BUSY defines MAX_BUSY, and the symbolic names for the access type codes.

Copyright © 1996, Thinkage Ltd.