Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ SV_ALLOC(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SV_ALLOC(D3DK)  —  

NAME

SV_ALLOC − allocate and initialize a synchronization variable .IX \f4SV_ALLOC\fP(D3DK)

SYNOPSIS

#include <sys/kmem.h>
#include <sys/ksynch.h>
sv_t ∗SV_ALLOC(int flag);

ARGUMENTS

flagSpecifies whether the caller is willing to sleep waiting for memory.  If flag is set to KM_SLEEP, the caller will sleep if necessary until sufficient memory is available.  If flag is set to KM_NOSLEEP, the caller will not sleep, but SV_ALLOC will return NULL if sufficient memory is not immediately available. 

DESCRIPTION

SV_ALLOC dynamically allocates and initializes an instance of a synchronization variable. 

RETURN VALUE

Upon successful completion, SV_ALLOC returns a pointer to the newly allocated synchronization variable.  If KM_NOSLEEP is specified and sufficient memory is not immediately available, SV_ALLOC returns a NULL pointer. 

LEVEL

Base only if flag is set to KM_SLEEP.  Base or interrupt if flag is set to KM_NOSLEEP. 

NOTES

May sleep if flag is set to KM_SLEEP.  Driver defined basic locks and read/write locks may be held across calls to this function if flag is KM_NOSLEEP but may not be held if flag is KM_SLEEP.  Driver defined sleep locks may be held across calls to this function regardless of the value of flag. 

SEE ALSO

SV_BROADCAST(D3DK), SV_DEALLOC(D3DK), SV_SIGNAL(D3DK), SV_WAIT(D3DK), SV_WAIT_SIG(D3DK)

DDI/DKI

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026