Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

physio(9F)

NAME

physio, minphys − perform physical I/O

SYNOPSIS

#include <sys/types.h>
#include <sys/buf.h>
#include <sys/uio.h>
int physio(void (∗strat)(), struct buf ∗bp, dev_t dev
, int rw, void (∗mincnt)(), struct uio ∗uio)
void minphys(struct buf ∗bp)

ARGUMENTS

physio()

strat Pointer to device strategy routine. 

bp Pointer to a buffer describing the transfer.  If bp is set to NULL then a buffer is borrowed from the buffer pool and returned to the free list after the transfer completes. 

dev The device number. 

rw Read/write flag. 

mincnt
Routine which bounds the maximum transfer unit size.

uio Pointer to the uio structure which defines the user space of the I/O request. 

minphys()

bp Pointer to a buf structure. 

INTERFACE LEVEL

SPARC architecture specific (SPARC DDI). 

DESCRIPTION

physio() performs unbuffered I/O operations between the device dev and the address space described in the uio structure. 

Prior to the start of the transfer physio() verifies the requested operation is valid by checking the protection of the address space specified in the uio structure.  It then faults in and locks the pages impacted by the I/O transfer so they can not be swapped out.  The device strategy routine, strat(), is then called one or more times to perform the physical I/O operations.  Upon completion, or detection of an error, physio() unlocks the faulted pages and returns the error status. 

physio() uses mincnt() to bound the maximum transfer unit size to the system, or device, maximum length.  minphys() is the system mincnt() routine for use with physio() operations.  Drivers which do not provide their own local mincnt() routines should call physio() with minphys(). 

minphys() limits the value of bp->b_bcount to MAXPHYS. 

RETURN VALUES

physio() returns:

0 on success. 

non-zero on failure. 

CONTEXT

Base Only (Do not call from an interrupt routine)

SunOS 5.1/SPARC  —  Last change: 11 Apr 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026