allocate a STREAMS message block with physical requirements
Synopsis (Not in ODDI)
mblk_t *allocb_physreq(int size, uint_t pri, physreq_t *preqp);
tries to allocate a STREAMS message block
with specific physical characteristics.
The memory for the data buffer pointed to by
db_base member of the
satisfies the constraints specified by the
pointed to by preqp.
The number of bytes in the message block.
Hint to the allocator indicating priority of the request.
Valid values are:
Used for normal data allocations.
At this priority,
may fail even though the requested buffer size is available.
This priority is used the the Stream head
routine to hold data associated with user calls.
Used for other non-critical allocations
such as normal data and control block allocation.
As with BPRI_LO,
may fail at this priority
even though a buffer of the requested size is available.
However, BPRI_MED calls will fail less frequently
than BPRI_LO calls.
Use for allocations that must succeed
such as critical control message allocations,
although success is not guaranteed.
Some implementations may choose to ignore this parameter.
Pointer to the
structure that specifies
the physical requirements for the data buffer.
The physreq structure must be allocated with the
and prepped with the
function before the call to
a pointer to the allocated message block of type
If a block cannot be allocated,
a NULL pointer is returned.
should be used instead of
whenever the data is to be made accessible
to a hardware device via DMA
or when other physical requirements
suh as starting address alignment
or physical address range must be met.
allocations are made below the 4GB boundary.
Buffer allocation fails only when the system is out of memory
which can satisfy the constraints.
If no buffer is available, the
function can help a module
recover from an allocation failure.
Base or Interrupt.
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
SCO OpenServer 5 ODDI compatibility
This function is not supported for DDI drivers,
which allocate all message blocks with the
function, even for DMA.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005