.TH "DDI/DKI kernel routines" "" "" Overview
.PC
.PP
The \*(CO implementation of the DDI/DKI includes the following routines:
Note that the routines marked with an asterisk `*' are used with
\*(CO's implementation of the DDI/DKI interface, but are not part of the
published description of the DDI/DKI.
Code that uses them will not be portable to other operating systems.
.nf
.sp \n(pDu
.ta 1.5i
.tc . 0.1i
\fBadjmsg()\fR	Clip a message
\fBallocb()\fR	Allocate a message block
\fBASSERT()\fR	Debug an expression
\fBbackq()\fR	Get a pointer to the preceding queue
\fBbcanput()\fR	Test for flow control in a priority band
\fBbcanputnext()\fR	Test for flow control in a priority band
\fBbcopy()\fR	Copy data between locations within the kernel
\fBbufcall()\fR	Call a function when a buffer becomes available
\fBbzero()\fR	Initialize a block of memory to zero
\fBcanput()\fR	Test for room in a queue
\fBcanputnext()\fR	Test for room in a queue
\fBcmn_err()\fR	Display an error message or panic the system
\fBcopyb()\fR	Copy a message block
\fBcopyin()\fR	Copy data from a user's buffer to a driver's buffer
\fBcopymsg()\fR	Copy a message
\fBcopyout()\fR	Copy data from a driver's buffer to a user's buffer
\fBdatamsg()\fR	Test whether a message is a data message
\fBddi_base_data()\fR*	Get DDI/DKI base data on per-process basis
\fBddi_cpu_data()\fR*	Get DDI/DKI global data on per-processor basis
\fBddi_global_data()\fR*	Get DDI/DKI global data
\fBddi_proc_data()\fR*	Get DDI/DKI global data on a per-process basis
\fBdrv_getparm()\fR	Retrieve information about the kernel state
\fBdrv_hztousec()\fR	Convert clock ticks to microseconds
\fBdrv_priv()\fR	Determine whether credentials are privileged
\fBdrv_setparm()\fR	Set kernel state information
\fBdrv_usectohz()\fR	Convert microseconds to clock ticks
\fBdupb()\fR	Duplicate a message block
\fBdupmsg()\fR	Duplicate a message
\fBenableok()\fR	Enable a queue to be serviced
\fBesballoc()\fR	Allocate a message block with an externally supplied buffer
\fBesbbcall()\fR	Call a function when an externally-supplied buffer can be allocated
\fBetoimajor()\fR	Convert external to internal major device number
\fBflushband()\fR	Flush messages in a priority band
\fBflushq()\fR	Flush messages on a queue
\fBfreeb()\fR	Free a message block
\fBfreemsg()\fR	Free a message
\fBfreerbuf()\fR	Free a buffer header used for raw I/O
\fBfreezestr()\fR	Freeze a stream
\fBgetemajor()\fR	Get external major-device number
\fBgeteminor()\fR	Get external minor-device number
\fBgetmajor()\fR	Get internal major-device number
\fBgetminor()\fR	Get internal minor-device number
\fBgetq()\fR	Get the next message from a queue
\fBgetrbuf()\fR	Allocate a buffer header for raw I/O
\fBinb()\fR	Read a byte from an eight-bit I/O port
\fBinl()\fR	Read a 32-bit long word from a 32-bit I/O port
\fBinsq()\fR	Insert a message into a queue
\fBinw()\fR	Read a 16-bit short word from a 16-bit I/O port
\fBitimeout()\fR	Execute a function after a given length of time
\fBitoemajor()\fR	Convert internal to external major number
\fBkmem_alloc()\fR	Allocate space from kernel free memory
\fBkmem_free()\fR	Free previously allocated kernel memory
\fBkmem_zalloc()\fR	Allocate space from kernel free memory
\fBlinkb()\fR	Concatenate two message blocks
\fBLOCK()\fR	Acquire a basic lock
\fBLOCK_ALLOC()\fR	Allocate a basic lock
\fBLOCK_DEALLOC()\fR	Deallocate a basic lock
\fBmakedevice()\fR	Make device number from major and minor numbers
\fBmsgdsize()\fR	Return number of bytes of data in a message
\fBmsgpullup()\fR	Concatenate bytes in a message
\fBnoenable()\fR	Prevent a queue from being scheduled
\fBOTHERQ()\fR	Get pointer to queue's partner queue
\fBoutb()\fR	Write a byte to an eight-bit I/O port
\fBoutl()\fR	Write a long integer to an 32-bit I/O port
\fBoutw()\fR	Write a word to an 16-bit I/O port
\fBpcmsg()\fR	Test whether a message is a priority-control message
\fBphalloc()\fR	Allocate and initialize a pollhead structure
\fBphfree()\fR	Free a pollhead structure
\fBphysiock()\fR	Request and validate raw I/O
\fBpollwakeup()\fR	Inform polling process that an event has occurred
\fBproc_ref()\fR	Obtain a reference to a process for signalling
\fBproc_signal()\fR	Send a signal to a process
\fBpullupmsg()\fR	Concatenate bytes in a message
\fBput()\fR	Call a put procedure
\fBputbq()\fR	Place a message at the head of a queue
\fBputctl()\fR	Send a control message to a queue
\fBputctl1()\fR	Send a control message and a parameter to a queue
\fBputnext()\fR	Send a message to the next queue
\fBputnextctl()\fR	Send a control message to a queue
\fBputnextctl1()\fR	Send a control message and a parameter to a queue
\fBputq()\fR	Put a message onto a queue
\fBqenable()\fR	Schedule a queue's service routine for running
\fBqprocsoff()\fR	Disable put and service routines
\fBqprocson()\fR	Enable put and service routines
\fBqreply()\fR	Send a message in the opposite direction on a stream
\fBqsize()\fR	Find the number of messages on a queue
\fBRD()\fR	Get a pointer to a read queue
\fBrepinsb()\fR	Read bytes from an I/O port to a buffer
\fBrepinsd()\fR	Read 32-bit words from an I/O port to a buffer
\fBrepinsw()\fR	Read 16-bit words from an I/O port to a buffer
\fBrepoutsb()\fR	Read bytes from a buffer to an I/O port
\fBrepoutsd()\fR	Read 32-bit words from a buffer to an I/O port
\fBrepoutsw()\fR	Read 16-bit words from a buffer to an I/O port
\fBrmvb()\fR	Remove a message block from a message
\fBrmvq()\fR	Remove a message from a queue
\fBRW_ALLOC()\fR	Allocate and initialize a read/write lock
\fBRW_DEALLOC()\fR	Deallocate an instance of a read/write lock
\fBRW_RDLOCK()\fR	Acquire a read/write lock in read mode
\fBRW_TRYRDLOCK()\fR	Try to acquire a read/write lock in read mode
\fBRW_TRYWRLOCK()\fR	Try to acquire a read/write lock in write mode
\fBRW_UNLOCK()\fR	Release a read/write lock
\fBRW_WRLOCK()\fR	Acquire a read/write lock in write mode
\fBSAMESTR()\fR	Test if next queue is same type
\fBset_user_error()\fR	Set an error code in the user space
\fBSLEEP_ALLOC()\fR	Allocate and initialize a sleep lock
\fBSLEEP_DEALLOC()\fR	Deallocate a sleep lock
\fBSLEEP_LOCK()\fR	Acquire a sleep lock
\fBSLEEP_LOCK_SIG()\fR	Acquire a sleep lock
\fBSLEEP_LOCKAVAIL()\fR	Query whether a sleep lock is available
\fBSLEEP_LOCKOWNED()\fR	Query whether a sleep lock is held by the caller
\fBSLEEP_TRYLOCK()\fR	Try to acquire a sleep lock
\fBSLEEP_UNLOCK()\fR	Release a sleep lock
\fBsplbase()\fR	Block no interrupts
\fBspldisk()\fR	Block disk-device interrupts
\fBsplhi()\fR	Block STREAMS interrupts
\fBsplstr()\fR	Block STREAMS interrupts
\fBspltimeout()\fR	Block timeout interrupts
\fBsplx()\fR	Reset an interrupt-priority level
\fBstrlog()\fR	Submit messages to the log driver
\fBstrqget()\fR	Get information about a queue
\fBstrqset()\fR	Change information about a queue or band of a queue
\fBsv_alloc()\fR	Allocate and initialize a synchronization variable
\fBSV_BROADCAST()\fR	Wake up all processes sleeping on a synchronization variable
\fBSV_DEALLOC()\fR	Deallocate an instance of a synchronization variable
\fBSV_SIGNAL()\fR	Wake up one process sleeping on a synchronization variable
\fBSV_WAIT()\fR	Sleep on a synchronization variable
\fBSV_WAIT_SIG()\fR	Sleep on a synchronization variable
\fBtestb()\fR	Check for an available buffer
\fBTRYLOCK()\fR	Try to acquire a basic lock
\fBuiomove()\fR	Copy data using \fBuio\fR structure
\fBunbufcall()\fR	Cancel a pending request to \fBbufcall()\fR
\fBunfreezestr()\fR	Unfreeze a stream
\fBunlinkb()\fR	Remove a message block from the head of a message
\fBUNLOCK()\fR	Release a basic lock
\fBuntimeout\fR	Cancel execution of a previously scheduled function
\fBureadc()\fR	Copy a character to space described by a \fBuio\fR structure
\fBuwritec()\fR	Copy a character from space described by a \fBuio\fR structure
\fBWR()\fR	Get a pointer to the write queue
.SH "See Also"
.B
device driver,
internal kernel routines,
STREAMS
.R
