[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel and Subsystems Technical Reference, Volume 1

m_getclustm Kernel Service

Purpose

Allocates an mbuf structure from the mbuf buffer pool and attaches a cluster of the specified size.

Syntax


#include <sys/mbuf.h>
struct mbuf *
m_getclustm(wait, type, size)
int wait;
int type;
int size;

Parameters

wait Specifies either the M_DONTWAIT or M_WAIT value.
type Specifies a valid mbuf type from the /usr/include/sys/mbuf.h file.
size Specifies the size of the external cluster to attach. Valid sizes are in the /usr/include/sys/mbuf.h file.

Description

The m_getclustm service allocates an mbuf structure of the specified type. If successful, the m_getclustm service then attempts to attach a cluster of the indicated size (specified by the size parameter) to the mbuf structure. If the buffer pool is empty and the wait parameter is set to M_WAIT, the m_get service does not return until an mbuf structure is available. Interrupt handlers should call this service only with the wait parameter set to M_DONTWAIT.

Execution Environment

The m_getclustm kernel service can be called from either the process or interrupt environment.

An interrupt handler can specify the wait parameter as M_DONTWAIT only.

Return Values

The m_getclustm kernel service returns the address of an allocated mbuf structure on success. If the wait parameter is set to M_DONTWAIT and there are no free mbuf structures, the m_getclustm kernel service returns null.

Implementation Specifics

The m_getclustm kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The m_clget kernel service, m_free kernel service, m_freem kernel service, m_get kernel service.

The m_getclust macro.

I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]