getnextpg(D3DK) —
.IX \f4getnextpg\fP(D3DK)
NAME
getnextpg − get next page pointer
SYNOPSIS
#include <sys/types.h>
#include <vm/page.h>
#include <sys/buf.h>
page_t ∗getnextpg(buf_t ∗bp, page_t ∗pp);
ARGUMENTS
bpPointer to the buffer header structure.
ppPointer to the previous page structure returned.
DESCRIPTION
getnextpg will return a pointer to the next page in a buffer header’s page list [see buf(D4DK)] during a paged-I/O request. A paged-I/O request is identified by the B_PAGEIO flag being set in the b_flags field of the buffer header passed to a driver’s strategy(D2DK) routine.
Given a buffer header, bp, and a pointer to the page, pp, returned from the previous call to getnextpg, the next page is returned. If pp is NULL, the first page in the page list is returned.
RETURN VALUE
On success, a pointer to the next page structure in the page list is returned. If the end of the list is reached, NULL is returned.
LEVEL
Base or Interrupt.
NOTES
Does not sleep. Driver defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
devflag(D1DK), strategy(D2DK), bp_mapin(D3DK), bp_mapout(D3DK), pptophys(D3DK), buf(D4DK)
DDI/DKI