Kernel Functions for Drivers scsihbatranalloc(9F)
NAME
scsihbatranalloc, scsihbatranfree - allocate and free
transport structures
SYNOPSIS
#include
scsihbatrant *scsihbatranalloc(devinfot *dip, int flags);
void scsihbatranfree(scsihbatrant *hbatran);
INTERFACE LEVEL
Solaris architecture specific (Solaris DI).
PARAMETERS
dip Pointer to a devinfo structure, defining the
HBA driver instance.
flag Flag modifiers. The only possible flag value is
SCSIHBACANSLEP (memory allocation may sleep).
hbatran Pointer to a scsihbatran(9S) structure.
DESCRIPTION
For scsihbatranalloc():
The scsihbatranalloc() function allocates a
scsihbatran(9S) structure for a HBA driver. The HBA must
use this structure to register its transport vectors with
the system by using scsihbaattachsetup(9F).
If the flag SCSIHBACANSLEP is set in flags,
scsihbatranalloc() may sleep when allocating resources;
otherwise it may not sleep, and callers should be prepared
to deal with allocation failures.
For scsihbatranfree():
The scsihbatranfree() function is used to free the
scsihbatran(9S) structure allocated by
scsihbatranalloc().
SunOS 5.11 Last change: 16 Jan 2006 1
Kernel Functions for Drivers scsihbatranalloc(9F)
RETURN VALUES
The scsihbatranalloc() function returns a pointer to the
allocated transport structure, or NUL if no space is avail-
able.
CONTEXT
The scsihbatranalloc() function can be called from user,
interrupt, or kernel context. Drivers must not allow
scsihbatranalloc() to sleep if called from an interrupt
routine.
The scsihbatranfree() function can be called from user,
interrupt, or kernel context context.
SEE ALSO
scsihbaattachsetup(9F), scsihbatran(9S)
Writing Device Drivers
SunOS 5.11 Last change: 16 Jan 2006 2
|