Allocates a pinned storage element from an ldata pool.
#include <sys/ldata.h>
void * ldata_alloc (ldatap)
ldata_t ldatap;
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.
Item | Description |
---|---|
ldatap | Specifies the handle of the ldata pool. |
The ldata_alloc kernel service can be called from the process or interrupt environment.
Returns a pointer to a pinned storage element allocated from an ldata pool or NULL if no element could be allocated.
The ldata_alloc kernel service is part of the Base Operating System (BOS) Runtime.