Specifications

Operating System Routines
IOC$VERIFYCHAN
IOC$VERIFYCHAN
Verifies an I/O channel number and translates it to a CCB address.
Module
IOSUBPAGD
Input
Location Contents
R0 Channel number (in low word)
CTL$GL_CCBBASE Base address of process CCB table
CCB$B_AMOD Access mode (plus 1) of process owning the channel
Output
Location Contents
R0 SS$_NORMAL, SS$_IVCHAN, or SS$_NOPRIV
R1 Address of CCB
R2 Channel index number
R3 Destroyed
Synchronization
Because IOC$VERIFYCHAN gains access to information stored in user process
virtual address space, it should only be called from code originating at IPL$_
ASTDEL or below.
Description
Drivers call IOC$VERIFYCHAN to validate a user-supplied channel number,
construct a channel index, and obtain the address of the CCB to which the
channel number points.
If the channel number is invalid or zero, or if the channel is unowned,
IOC$VERIFYCHAN returns SS$_IVCHAN status to its caller.
If the access mode of the current process is less privileged than that indicated in
CCB$B_AMOD, IOC$VERIFYCHAN returns SS$_NORMAL!SS$_NOPRIV status
to its caller with the address of the CCB in R1.
Otherwise, IOC$VERIFYCHAN returns successfully to its caller with the address
of the CCB in R1.
3–142