Allocates and zeroes a memory buffer from the mbuf pool.
#include <sys/types.h> #include <sys/errno.h> #include <sys/mbuf.h>
struct mbuf *m_getclr (wait, type) int wait; int type;
The m_getclr 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 value, the m_getclr service does not return until an mbuf structure is available.
The m_getclr kernel service differs from the m_get kernel service in that the m_getclr service zeroes the data portion of the allocated mbuf structure.
The m_getclr kernel service can be called from either the process or interrupt environment. Interrupt handlers can call the m_getclr service only with the wait parameter set to the M_DONTWAIT value.
The m_getclr kernel service returns the address of an allocated mbuf structure. If the wait parameter is set to the M_DONTWAIT value and there are no free mbuf structures, the m_getclr kernel service returns a null value.
The m_getclr kernel service is part of Base Operating System (BOS) Runtime.
The m_free kernel service, m_freem kernel service, m_get kernel service.
I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.