Next | Prev | Up | Top | Contents | Index

Kernel Functions

The IRIX kernel makes available the Table A-4 functions summarized in .

Kernel Functions
NameSummaryDiscussedVersions
adjmsg(D3) Trim bytes from a message. SV, 5.3
allocb(D3) Allocate a message block. SV, 5.3
ASSERT(D3) Debugging macro designed for use in the kernel (compare to assert(3X)).page 2525.3
badaddr(D3) Test physical address for input.page 1955.3
badaddr_val(D3) Test physical address for input and return the input value received.page 1956.2
bcanput(D3) Test for flow control in a specified priority band. SV, 5.3
bcanputnext(D3) Test for flow control in a specified priority band. SV, 5.3
bcmp(D3) Compare data between kernel locations.page 193SV, 5.3
bcopy(D3) Copy data between locations in the kernel.page 193SV, 5.3
biodone(D3) Mark a buf_t as complete and wake any process waiting for it.page 217 SV, 5.3
bioerror(D3) Manipulate error fields within a buf_t.page 217SV, 5.3
biowait(D3) Suspend process pending completion of block I/O.page 217SV, 5.3
bp_mapin(D3) Map buffer pages into kernel virtual address space.page 199SV, 5.3
bp_mapout(D3) Release mapping of buffer pages.page 199SV, 5.3
bptophys(D3) Get physical address of buffer data.page 1985.3
brelse(D3) Return a buffer to the system's free list.page 190SV, 5.3
btod(D3) Return number of 512-byte "sectors" in a byte count (round up).page 1975.3
btop(D3) Return number of I/O pages in a byte count (truncate).page 197SV, 5.3
btopr(D3) Return number of I/O pages in a byte count (round up).page 197SV, 5.3
bufcall(D3) Call a function when a buffer becomes available. SV, 5.3
bzero(D3) Clear kernel memory for a specified size.page 192SV, 5.3
canput(D3) Test for room in a message queue. SV, 5.3
canputnext(D3) Test for room in a message queue. SV, 5.3
clrbuf(D3) Erase the contents of a buffer desribed by a buf_t.page 199SV, 5.3
cmn_err(D3) Display an error message or panic the system.page 249SV*, 5.3
copyb(D3) Copy a message block. SV, 5.3
copyin(D3) Copy data from user address space.page 192SV, 5.3
copymsg(D3) Copy a message. SV, 5.3
copyout(D3) Copy data to user address space.page 192SV, 5.3
cpsema(D3) Conditionally decrement a semaphore's state.page 2225.3
cvsema(D3) Conditionally increment a semaphore's statepage 2225.3
datamsg(D3) Test whether a message is a data message. SV, 5.3
delay(D3) Delay for a specified number of clock ticks.page 214SV, 5.3
disable_sysad_parity()Disable memory parity checking on SysAD bus.page 526 
dki_dcache_inval(D3) Invalidate the data cache for a given range of virtual addresses.page 2005.3
dki_dcache_wb(D3) Write back the data cache for a given range of virtual addresses.page 2005.3
dki_dcache_wbinval(D3) Write back and invalidate the data cache for a given range of virtual addresses.page 2005.3
dma_map(D3) Load DMA mapping registers for an imminent transfer.page 3305.3
dma_mapbp(D3) Load DMA mapping registers for an imminent transfer.page 3305.3
dma_mapaddr(D3) Return the "bus virtual" address for a given map and address.page 3305.3
dma_mapalloc(D3) Allocate a DMA map.page 3305.3
dma_mapfree(D3) Free a DMA map.page 3305.3
drv_getparm(D3) Retrieve kernel state information.page 202SV*, 5.3
drv_hztousec(D3) Convert clock ticks to microsecondspage 214SV, 5.3
drv_priv(D3) Test for privileged user.page 202SV, 5.3
drv_setparm(D3) Set kernel state information.page 202SV, 5.3
drv_usectohz(D3) Convert microseconds to clock ticks.page 214SV, 5.3
drv_usecwait(D3) Busy-wait for a specified interval.page 214SV, 5.3
dtimeout(D3) Schedule a function execute on a specified processor after a specified length of time.page 2145.3
dupb(D3) Duplicate a message block. SV, 5.3
dupmsg(D3) Duplicate a message. SV, 5.3
eisa_dma_disable(D3) Disable recognition of hardware requests on a DMA channel.page 4465.3
eisa_dma_enable(D3) Enable recognition of hardware requests on a DMA channel.page 4465.3
eisa_dma_free_buf(D3) Free a previously allocated DMA buffer descriptor.page 4465.3
eisa_dma_free_cb(D3) Free a previously allocated DMA command block.page 4465.3
eisa_dma_get_buf(D3) Allocate a DMA buffer descriptor.page 4465.3
eisa_dma_get_cb(D3) Allocate a DMA command block.page 4465.3
eisa_dma_prog(D3) Program a DMA operation for a subsequent software request.page 4465.3
eisa_dma_stop(D3) Stop software-initiated DMA operation and release channel.page 4465.3
eisa_dma_swstart(D3) Initiate a DMA operation via software request.page 4465.3
eisa_dmachan_alloc()Allocate a DMA channel for EISA slave DMA.page 4445.3
eisa_ivec_alloc()Allocate an IRQ level for EISA.page 4425.3
eisa_ivec_set()Associate a handler with an EISA IRQ.page 4425.3
enableok(D3) Allow a queue to be serviced. SV, 5.3
enable_sysad_parity()Reenable parity checking on SysAD bus.page 526 
esballoc(D3) Allocate a message block using an externally-supplied buffer. SV, 5.3
esbbcall(D3) Call a function when an externally-supplied buffer can be allocated. SV, 5.3
etoimajor(D3) Convert external to internal major device number.page 181SV, 5.3
fast_itimeout(D3) Same as itimeout() but takes an interval in "fast ticks."page 2146.2
fasthzto(D3)Returns the value of a struct timeval as a count of "fast ticks."page 2146.2
flushband(D3) Flush messages in a specified priority band. SV, 5.3
flushbus(D3) Make sure contents of the write buffer are flushed to the system buspage 2005.3
flushq(D3) Flush messages on a queue. SV, 5.3
freeb(D3) Free a message block. SV, 5.3
freemsg(D3) Free a message. SV, 5.3
freerbuf(D3) Free a buf_t with no buffer.page 190SV, 5.3
freesema(D3) Free the resources associated with a semaphore.page 2225.3*
freezestr(D3) Freeze the state of a stream. SV, 5.3
fubyte(D3) Load a byte from user space.page 1925.3
fuword(D3) Load a word from user space.page 1925.3
geteblk(D3) Get a buf_t with no buffer.page 190SV, 5.3
getemajor(D3) Get external major device number.page 181SV, 5.3
geteminor(D3) Get external minor device number.page 181SV, 5.3
geterror(D3) retrieve error number from a buffer headerpage 217SV, 5.3
getmajor(D3) Get internal major device number.page 181SV, 5.3
getminor(D3) Get internal minor device number.page 181SV, 5.3
getnextpg(D3) Return pfdat structure for next page.page 1995.3
getq(D3) Get the next message from a queue. SV, 5.3
getrbuf(D3) Allocate a buf_t with no buffer.page 190SV, 5.3
hwcpin(D3) Copy data from device registers to kernel memory.page 1925.3
hwcpout(D3) Copy data from kernel memory to device registers.page 1925.3
initnsema(D3) Initialize a semaphore to a specified count.page 2225.3
initnsema_mutex(D3) Initialize a semaphore to a count of 1.page 2225.3
insq(D3) Insert a message into a queue. SV, 5.3
ip26_enable_ucmem(D3) Change memory mode on IP26 processor.page 276.2
ip26_return_ucmem(D3) Change memory mode on IP26 processor.page 27SV, 5.3
is_sysad_parity_enabled()Test for parity checking on SysAD bus.page 5265.3
itimeout(D3) Schedule a function to be executed after a specified number of clock ticks.page 214SV, 5.3
itoemajor(D3) Convert internal to external major device number.page 181SV, 5.3
kern_calloc(D3) Allocate and clear space from kernel memory.page 1875.3
kern_free(D3) Free kernel memory space.page 1875.3
kern_malloc(D3) Allocate kernel virtual memory.page 1875.3
kmem_alloc(D3) Allocate space from kernel free memory.page 187SV, 5.3
kmem_free(D3) Free previously allocated kernel memory.page 187SV, 5.3
kmem_zalloc(D3) Allocate and clear space from kernel free memory.page 187SV, 5.3
kvtophys(D3) Get physical address of kernel data.page 1995.3
linkb(D3) Concatenate two message blocks. SV*, 5.3*
LOCK(D3) Acquire a basic lock, waiting if necessary.page 205SV*, 5.3*
LOCK_ALLOC(D3) Allocate and initialize a basic lock.page 205SV*, 5.3*
LOCK_DEALLOC(D3) Deallocate an instance of a basic lock.page 205SV*, 5.3*
LOCK_INIT(D3)Initialize a basic lock that was allocated statically, or reinitialize an allocated lock.page 2056.2
LOCK_DESTROY(D3)Uninitialize a basic lock that was allocated statically.page 2056.2
makedevice(D3) Make device number from major and minor numbers.page 181SV, 5.3
max(D3) Return the larger of two integers. SV, 5.3
min(D3) Return the lesser of two integers. SV, 5.3
msgdsize(D3) Return number of bytes of data in a message. SV, 5.3
msgpullup(D3) Concatenate bytes in a message. SV, 5.3
MUTEX_ALLOC(D3) Allocate and initialize a mutex lock.page 2076.2
MUTEX_DEALLOC(D3) Deinitialize and free a dynamically allocated mutex lock.page 2076.2
MUTEX_DESTROY(D3) Deinitialize a mutex lock.page 2076.2
MUTEX_INIT(D3) Initialize an existing mutex lock.page 2076.2
MUTEX_ISLOCKED(D3) Test if a mutex lock is owned.page 2076.2
MUTEX_LOCK(D3) Claim a mutex lock.page 2076.2
MUTEX_MINE(D3) Test if a mutex lock is owned by this process.page 2076.2
MUTEX_TRYLOCK(D3) Conditionally claim a mutex lock.page 2076.2
MUTEX_UNLOCK(D3) Release a mutex lock.page 2076.2
MUTEX_WAITQ(D3) Get the number of processes blocked by mutex lock.page 2076.2
ngeteblk(D3) Allocate a buf_t and a buffer of specified size.page 190SV, 5.3
noenable(D3) Prevent a queue from being scheduled. SV, 5.3
OTHERQ(D3) Get a pointer to queue's partner queue. SV, 5.3
pcmsg(D3) Test whether a message is a priority control message. SV, 5.3
phalloc(D3) Allocate and initialize a pollhead structure.page 189SV, 5.3
phfree(D3) Free a pollhead structure.page 189SV, 5.3
physiock(D3) Validate and issue a raw I/O requestpage 217SV, 5.3
pio_andb_rmw(D3) Byte read-and-write.page 3255.3
pio_andh_rmw(D3) 16-bit read-and-write.page 3255.3
pio_andw_rmw(D3) 32-bit read-and-write.page 3255.3
pio_badaddr(D3) Check for bus error when reading an address.page 3255.3
pio_badaddr_val(D3) Check for bus error when reading an address and return the value read.page 3255.3
pio_bcopyin(D3) Copy data from a bus address to kernel's virtual space.page 3255.3
pio_bcopyout(D3) Copy data from kernel's virtual space to a bus address.page 3255.3
pio_mapaddr(D3) Convert a bus address to a virtual address.page 3255.3
pio_mapalloc(D3) Allocate a PIO map.page 3255.3
pio_mapfree(D3) Free a PIO map.page 3255.3
pio_orb_rmw(D3) Byte read-or-write.page 3255.3
pio_orh_rmw(D3) 16-bit read-or-write.page 3255.3
pio_orw_rmw(D3) 32-bit read-or-write.page 3255.3
pio_wbadaddr(D3) Check for bus error when writing to an address.page 3255.3
pio_wbadaddr_val(D3) Check for bus error when writing a specified value to an address.page 3255.3
pollwakeup(D3) Inform polling processes that an event has occurred.page 156SV, 5.3
pptophys(D3) Convert page pointer to physical address.page 199SV, 5.3
proc_ref(D3) Obtain a reference to a process for signaling.page 202SV, 5.3
proc_signal(D3) Send a signal to a process.page 202SV, 5.3
proc_unref(D3) Release a reference to a process.page 202SV, 5.3
psema(D3) Perform a "P" or wait semaphore operation.page 222SV, 5.3
ptob(D3) Convert size in pages to size in bytes.page 197SV, 5.3
pullupmsg(D3) Concatenate bytes in a message. SV, 5.3
putbq(D3) Place a message at the head of a queue. SV, 5.3
putctl(D3) Send a control message to a queue. SV, 5.3
putctl1(D3) Send a control message with a one-byte parameter to a queue. SV, 5.3
putnext(D3) Send a message to the next queue. SV, 5.3
putnextctl(D3) Send a control message to a queue. SV, 5.3
putnextctl1(D3) Send a control message with a one-byte parameter to a queue. SV, 5.3
putq(D3) Put a message on a queue. SV, 5.3
qenable(D3) Schedule a queue's service routine to be run. SV, 5.3
qprocsoff(D3) Enable put and service routines. SV, 5.3
qprocson(D3) Disable put and service routines SV, 5.3
qreply(D3) Send a message in the opposite direction in a stream. SV, 5.3
qsize(D3) Find the number of messages on a queue. SV, 5.3
RD(D3) Get a pointer to the read queue. SV, 5.3
rmalloc(D3) Allocate space from a private space management map.page 191SV, 5.3
rmallocmap(D3) Allocate and initialize a private space management map.page 191SV, 5.3
rmalloc_wait(D3) Allocate resources from a space management map.page 191SV, 5.3
rmfree(D3) Release resources into a space management map.page 191SV, 5.3
rmfreemap(D3) Free a private space management map.page 191SV, 5.3
rmvb(D3) Remove a message block from a message. SV, 5.3
rmvq(D3) Remove a message from a queue. SV, 5.3
RW_ALLOC(D3) Allocate and initialize a reader/writer lock.page 211SV*, 5.3*
RW_DEALLOC(D3) Deallocate a reader/writer lock.page 211SV*, 5.3*
RW_DESTROY(D3) Deinitialize an existing reader/writer lock.page 2116.2
RW_INIT(D3) Initialize an existing reader/writer lock.page 2116.2
RW_RDLOCK(D3) Acquire a reader/writer lock as reader, waiting if necessary.page 211SV*, 5.3*
RW_TRYRDLOCK(D3) Try to acquire a reader/writer lock as reader, returning a code if it is not free.page 211SV*, 5.3*
RW_TRYWRLOCK(D3) Try to acquire a reader/writer lock as writer, returning a code if it is not free.page 211SV*, 5.3*
RW_UNLOCK(D3) Release a reader/writer lock as reader or writer.page 211SV*, 5.3*
RW_WRLOCK(D3) Acquire a reader/writer lock as writer, waiting if necessary.page 211SV*, 5.3*
SAMESTR(D3) Test if next queue is of the same type. SV, 5.3
scsi_abort()Transmits a SCSI ABORT command.page 3575.3*
scsi_alloc(D3) Open a connection between a driver and a target device.page 3575.3*
scsi_command(D3)Transmit a SCSI command on the bus and return results.page 3575.3*
scsi_free(D3) Release connection to target device.page 3575.3*
scsi_info(D3) Issue the SCSI Inquiry command and return the results.page 3575.3*
scsi_reset() Resets the SCSI adapter or bus.page 3575.3*
setgiovector()Register a GIO interrupt handler.page 5155.3
setgioconfig()Prepare a GIO slot for use.page 5165.3
sgset(D3) Assign physical addresses to a vector of software scatter-gather registers.page 1995.3
sleep(D3) Suspend process execution pending occurrence of an event.page 219SV, 5.3
SLEEP_ALLOC(D3) Allocate and initialize a sleep lock.page 209SV*, 5.3*
SLEEP_DEALLOC(D3) Deinitialize and deallocate a dynamically allocated sleep lock.page 209SV*, 5.3*
SLEEP_DESTROYDeinitialize a sleep lock.page 2096.2
SLEEP_INIT(D3) Initialize an existing sleep lock.page 2096.2
SLEEP_LOCK(D3) Acquire a sleep lock, waiting if necessary until the lock is free.page 209SV*, 5.3*
SLEEP_LOCKAVAIL(D3) Query whether a sleep lock is available.page 209SV*, 5.3*
SLEEP_LOCK_SIG(D3) Acquire a sleep lock, waiting if necessary until the lock is free or a signal is received.page 209SV*, 5.3*
SLEEP_TRYLOCK(D3) Try to acquire a sleep lock, returning a code if it is not free.page 209SV*, 5.3*
SLEEP_UNLOCK(D3) Release a sleep lock.page 209SV*, 5.3*
splbase(D3) Block no interrupts.page 213SV, 5.3
spltimeout(D3) Block only timeout interrupts.page 213SV, 5.3
spldisk(D3) Block disk interrupts.page 213SV, 5.3
splstr(D3) Block STREAMS interrupts.page 213SV, 5.3
spltty(D3) Block disk, VME, serial interrupts.page 213SV, 5.3
splhi(D3) Block all I/O interrupts.page 213SV, 5.3
spl0(D3) Same as splbase().page 213SV, 5.3
splx(D3) Restore previous interrupt level.page 213SV, 5.3
strcat(D3) Append one string to another. SV, 5.3
strcpy(D3) Copy a string. SV, 5.3
streams_interrupt(D3) Synchronize interrupt-level function with STREAMS mechanism. 5.3
STREAMS_TIMEOUT(D3) Synchronize timeout with STREAMS mechanism. 5.3
strlen(D3) Return length of a string. SV, 5.3
strlog(D3) Submit messages to the log driver. SV, 5.3
strncmp(D3) Compare two strings for a specified length. SV, 5.3
strncpy(D3) Copy a string for a specified length. SV, 5.3
strqget(D3) Get information about a queue or band of the queue. SV, 5.3
strqset(D3) Change information about a queue or band of the queue. SV, 5.3
subyte(D3) Store a byte to user space.page 1925.3
suword(D3) Store a word to user space.page 1925.3
SV_ALLOC(D3) Allocate and initialize a synchronization variable.page 220SV*, 5.3*
SV_BROADCAST(D3) Wake all processes sleeping on a synchronization variable.page 220SV*, 5.3*
SV_DEALLOC(D3) Deinitialize and deallocate a synchronization variable.page 220SV*, 5.3*
SV_DESTROYDeinitialize a synchronization variable.page 2206.2
SV_INITInitialize an existing synchronization variable.page 2206.2
SV_SIGNAL(D3) Wake one process sleeping on a synchronization variable.page 220SV*, 5.3*
SV_WAIT(D3) Sleep until a synchronization variable is signalled.page 220SV*, 5.3*
SV_WAIT_SIG(D3) Sleep until a synchronization variable is signalled or a signal is received.page 220SV*, 5.3*
timeout(D3) Schedule a function to be executed after a specified number of clock ticks.page 214SV, 5.3
TRYLOCK(D3) Try to acquire a basic lock, returning a code if the lock is not currently free.page 205SV*, 5.3*
uiomove(D3) Copy data using uio_t.page 194SV, 5.3
uiophysio(D3) Validate a raw I/O request and pass to a strategy function.page 2175.3
unbufcall(D3) Cancel a pending bufcall request. SV, 5.3
undma(D3) Unlock physical memory in user space.page 2175.3
unfreezestr(D3) Unfreeze the state of a stream. SV, 5.3
unlinkb(D3) Remove a message block from the head of a message. SV, 5.3
UNLOCK(D3) Release a basic lock.page 205SV*, 5.3*
untimeout(D3) Cancel a previous itimeout or fast_itimeout request.page 214SV*, 5.3*
ureadc(D3) Copy a character to space described by uio_t.page 194SV, 5.3
userdma(D3) Lock physical memory in user space.small number ofpage 2175.3
userabi()Get data sizes for the ABI of the user process (32- or 64-bit).page 1706.2
uwritec(D3) Return a character from space described by uio_t.page 194SV, 5.3
v_getaddr(D3) Get the user virtual address associated with a vhandl_t.page 1965.3
v_gethandle(D3) Get a unique identifier associated with a vhandl_t.page 1965.3
v_getlen(D3) Get the length of user address space associated with a vhandl_t.page 1965.3
v_mapphys(D3) Map kernel address space into user address space.page 1965.3
valusema(D3) Return the value associated with a semaphore.page 2225.3
vme_adapter(D3) Determine VME adapter that corresponds to a given memory address.page 3305.3
vme_ivec_alloc(D3) Allocate a VME bus interrupt vector.page 3325.3
vme_ivec_free(D3) Free a VME bus interrupt vector.page 3325.3
vme_ivec_set(D3) Register a VME bus interrupt vector.page 3325.3
vsema(D3) Perform a "V" or signal semaphore operation.page 2225.3
wakeup(D3) Waken a process waiting for an event.page 219SV, 5.3
wbadaddr(D3) Test physical address for output.page 195SV, 5.3
wbadaddr_val(D3)Test physical address for output of specific value. page 195SV, 5.3
WR(D3) Get a pointer to the write queue. SV, 5.3

The following SVR4 kernel functions are not implemented in IRIX: bioreset, dma_disable, dma_enable, dma_free_buf, dma_free_cb, dma_get_best_mode, dma_get_buf, dma_get_cb, dma_pageio, dma_prog, dma_swstart, dma_swsetup, drv_gethardware, hat_getkpfnum, hat_getppfnum, inb, inl, inw, kvtoppid, mod_drvattach, mod_drvdetach, outb, outl, outw, physmap, physmap_free, phystoppid, psignal, rdma_filter, repinsb, repinsd, repinsw, repoutsb, repoutsd, repoutsw, rminit, rmsetwant, SLEEP_LOCKOWNED, strncat, vtop.



Next | Prev | Up | Top | Contents | Index