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

m_clgetm Kernel Service

Purpose

Allocates and attaches an external buffer.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/mbuf.h>
int 
m_clgetm(m, how, size)
struct mbuf *m;
int  how;
int  size;

Parameters

m Specifies the mbuf structure that the cluster will be associated with.
how Specifies either the M_DONTWAIT or M_WAIT value.
size Specifies the size of external cluster to attach. Valid sizes are listed in the /usr/include/sys/mbuf.h file

Description

The m_clgetm service allocates an mbuf cluster of the specified number of bytes and attaches it to the mbuf structure indicated by the m parameter. If successful, the m_clgetm service sets the M_EXT flag.

Execution Environment

The m_clgetm 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

1 Indicates a successful operation.

If there are no free mbuf structures, the m_clgetm kernel service returns a null value.

Implementation Specifics

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

Related Information

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

The m_clget macro.

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


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