bcb_alloc(D3) bcb_alloc(D3)
NAME
bcb_alloc - allocate a breakup control block
SYNOPSIS
#include <sys/buf.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
bcb_t *bcb_alloc(int flag);
Arguments
flag Indicates whether the allocation may sleep or not,
and is set to KM_SLEEP or KM_NOSLEEP.
DESCRIPTION
bcb_alloc allocates a bcb(D4) structure, which is used to pass
breakup property requirements to buf_breakup(D3).
Return Values
On success, bcb_alloc returns a pointer to a bcb structure.
If KM_NOSLEEP is specified and sufficient memory is not
immediately available, bcb_alloc returns a NULL pointer.
USAGE
bcb_alloc is typically called at driver startup time to
allocate a bcb for a driver or a drive. This bcb is then used
repeatedly, for each transfer, as an argument to buf_breakup.
Level
Base only if flag is set to KM_SLEEP.
Initialization or Base if flag is set to KM_NOSLEEP.
Synchronization Constraints
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.
REFERENCES
bcb(D4), bcb_free(D3), buf_breakup(D3)
Copyright 1994 Novell, Inc. Page 1
bcb_alloc(D3) bcb_alloc(D3)
NOTICES
Portability
All processors
Applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2