SVR5
physreq_prep(D3)
physreq_prep --
prepare a physical alignment requirements structure for use
Synopsis
#include <sys/types.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
boolean_t physreq_prep(physreq_t *preqp, int flag);
Description
physreq_prep prepares a physreq structure for use.
The physreq structure
is used by routines to define alignment constraints on
physical addresses.
Arguments
preqp-
Pointer to a previously allocated
physreq(D4)
structure.
flag-
Indicates whether the allocation may sleep or not, and is
set to KM_SLEEP or KM_NOSLEEP.
Return values
On success, physreq_prep returns B_TRUE.
On failure, the routine returns B_FALSE,
either due to allocation failure in the KM_NOSLEEP case or
due to unsupportable constraints specified in preqp.
Usage
physreq_prep must be called
after all necessary fields in the structure
pointed to by preqp have been set,
but before the structure is passed
to any I/O or allocation routine
such as
buf_breakup(D3),
kmem_alloc_physreq(D3),
or
msgphysreq(D3str).
This routine can be called multiple times on the same
physreq structure.
If the driver modifies the fields of the preqp
after it has been prepped, then the driver must call
physreq_prep( )
again before actually using it.
Context and synchronization
If flag is set to KM_NOSLEEP,
non-blockable, initialization, or interrupt
context.
If flag is set to KM_SLEEP,
user
context.
Hardware applicability
All
Version applicability
ddi:
5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
Differences between versions
References
buf_breakup(D3),
kmem_alloc_physreq(D3),
kmem_zalloc_physreq(D3),
msgphysreq(D3str),
physreq_alloc(D3),
physreq_free(D3),
physreq(D4)
``Memory allocation'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005