DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

rmalloc_wait(D3)


rmalloc_wait -- allocate space from a private space management map

Synopsis

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

ulong_t rmalloc_wait(struct map *mp, size_t size);

Description

rmalloc_wait allocates space from a private map previously allocated using rmallocmap(D3).

Arguments


mp
Pointer to map to resource map.

size
Number of units to allocate.

Return values

rmalloc_wait returns the base of the allocated space.

Usage

rmalloc_wait is identical to rmalloc(D3), except that a call to rmalloc_wait blocks (uninterruptible by signals), if necessary, until space becomes available.

Space allocated using rmalloc_wait may be returned to the map using rmfree(D3).

Context and synchronization

User or blockable context.

This function can be called when driver-defined sleep locks are held, but the driver writer must be cautious to avoid deadlock between the process holding the lock and trying to acquire the resource and another process holding the resource and trying to acquire the lock.

Hardware applicability

All

Version applicability

ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

rmalloc(D3), rmallocmap(D3), rmfree(D3), rmfreemap(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005