ldata_alloc Kernel Service

Purpose

Allocates a pinned storage element from an ldata pool.

Syntax

#include <sys/ldata.h>

void * ldata_alloc (ldatap)

ldata_t ldatap; 

Description

The ldata_alloc kernel service allocates a pinned storage element from a ldata pool and returns the address of the element. The ldata_alloc kernel service makes a pinned storage element from the ldata pool available for use by the caller. The sub-pool from which the element is allocated corresponds to the SRAD on which the call was made. If there are no free pinned elements, a new element cannot be allocated and a NULL value is returned.

After it is allocated, the pinned storage element can be freed to the ldata pool through the ldata_free kernel service.

Parameters

Item Description
ldatap Specifies the handle of the ldata pool.

Execution Environment

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

Return Values

Returns a pointer to a pinned storage element allocated from an ldata pool or NULL if no element could be allocated.

Implementation Specifics

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