msgpullup_physreq(D3) msgpullup_physreq(D3)
NAME
msgpullup_physreq - concatenate bytes in a message with
physical requirements
SYNOPSIS
#include <sys/stream.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
mblk_t *msgpullup_physreq(mblk_t *mp, int len, physreq_t *preqp);
Arguments
mp Pointer to the message whose blocks are to be
concatenated.
len Number of bytes to concatenate.
preqp Physical requirements for the data buffer.
DESCRIPTION
msgpullup_physreq concatenates and aligns the first len data
bytes of the message pointed to by mp, copying the data into a
new message. All message blocks that remain in the original
message once len bytes have been concatenated and aligned
(including any partial message blocks) are copied and linked
to the end of the new message, so that the length of the new
message is equal to the length of the original message.
The memory for the data buffer(s) pointed to by db_base (see
datab(D4)) of the new message block(s) will satisfy the
constraints specified by the physreq(D4) structure pointed to
by preqp. The data will always be in the front of the new
buffer; that is, b_rptr will equal db_base.
The original message is unaltered. If len equals -1, all data
are concatenated. If len bytes of the same message type
cannot be found, msgpullup_physreq fails and returns NULL.
Return Values
On success, msgpullup_physreq returns a pointer to the new
message. On failure, msgpullup_physreq returns NULL.
USAGE
msgpullup_physreq should be used instead of msgpullup(D3)
whenever the data is to be made accessible to a hardware
device via DMA.
Copyright 1994 Novell, Inc. Page 1
msgpullup_physreq(D3) msgpullup_physreq(D3)
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
allocb_physreq(D3), kmem_alloc_physreq(D3), msgphysreq(D3),
msgpullup(D3), datab(D4), msgb(D4), physreq(D4)
NOTICES
Portability
All processors
Applicability
ddi: 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2