xref: /titanic_41/usr/src/man/man9f/rmalloc_wait.9f (revision dc41c81f4872a0d4ce52a59cd88a576aeb49183a)
te
Copyright (c) 2006, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
RMALLOC_WAIT 9F "Jan 16, 2006"
NAME
rmalloc_wait - allocate space from a resource map, wait if necessary
SYNOPSIS

#include <sys/map.h>
#include <sys/ddi.h>



unsigned long rmalloc_wait(struct map *mp, size_t size);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS
mp

Pointer to the resource map from which space is to be allocated.

size

Number of units of space to allocate.

DESCRIPTION

The rmalloc_wait() function requests an allocation of space from a resource map. rmalloc_wait() is similar to the rmalloc(9F) function with the exception that it will wait for space to become available if necessary.

RETURN VALUES

The rmalloc_wait() function returns the base of the allocated space.

CONTEXT

This function can be called from user, interrupt, or kernel context. However, in most cases rmalloc_wait() should not be called from interrupt context.

SEE ALSO

rmalloc(9F), rmallocmap(9F), rmfree(9F), rmfreemap(9F)

Writing Device Drivers