Allocates an mbuf structure from the mbuf buffer pool and attaches a page-sized cluster.
#include <sys/mbuf.h>
struct mbuf *m_getclust ( wait, type)
int wait;
int type;
wait | Indicates the action to be taken if there are no available mbuf structures. Possible values are: |
type | Specifies a valid mbuf type from the /usr/include/sys/mbuf.h file. |
The m_getclust macro allocates an mbuf structure of the specified type. If the allocation succeeds, the m_getclust macro then attempts to attach a page-sized cluster to the structure.
If the buffer pool is empty and the wait parameter is set to M_WAIT, the m_getclust macro does not return until an mbuf structure is available.
The m_getclust macro can be called from either the process or interrupt environment.
The address of an allocated mbuf structure is returned on success. If the wait parameter is set to M_DONTWAIT and there are no free mbuf structures, the m_getclust macro returns a null value.
The m_getclustm kernel service.
I/O Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.