Allocates a memory buffer (mbuf) from the mbuf pool.
#include <sys/types.h> #include <sys/errno.h> #include <sys/mbuf.h>
struct mbuf *m_get (wait, type) int wait; int type;
The m_get kernel service allocates an mbuf structure of the specified type. If the buffer pool is empty and the wait parameter is set to M_WAIT, the m_get kernel service does not return until an mbuf structure is available.
The m_get kernel service can be called from either the process or interrupt environment.
An interrupt handler can specify the wait parameter as M_DONTWAIT only.
Upon successful completion, the m_get service returns the address of an allocated mbuf structure. If the wait parameter is set to M_DONTWAIT and there are no free mbuf structures, the m_get kernel service returns a null value.
The m_get kernel service is part of Base Operating System (BOS) Runtime.
The m_free kernel service, m_freem kernel service.
I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.