return a previously allocated piece of memory back to the pool
void sdi_free(struct head *headp, struct jpool *jp);
sdi_free returns the allocated area of
memory back to the pool it
was taken from.
After the completion of the use of the memory, the
target or HBA driver should return the memory to the pool,
because the pool is shared between all target and HBA drivers.
Because each target driver and HBA driver needs
large numbers of either
job structures or SCSI command blocks,
facilitate sharing of kernel memory.
The routines allocate from and
return memory to the kernel, based on demand.
pointer to the head structure of the pool
from which the memory piece was allocated
pointer to the memory piece to be returned to the pool
The normal return is SDI_RET_OK.
A return value of SDI_RET_ERR indicates an error
with the pointer.
sdi_free is typically used in a local
Rather than having a local pool of job or
command structures, SDI
drivers should use one of the two existing shared pools.
If the size
of structures in these pools is too small,
a new pool can be created
and used by a SDI driver.
In SVR4.2 MP,
the sdi_get and sdi_free routines do
nothing more than call
The headp parameter is maintained simply to keep a
record of the allocation size.
Context and synchronization
x86/Pentium compatible architectures
1, 2, 3, 4
HBA and target drivers.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005