1
0
Files
irix-657m-src/eoe/man/manD/esbbcall.d3
2022-09-29 17:59:04 +03:00

70 lines
2.2 KiB
Plaintext

.if n .pH ddi.rm/d3/gen/esbbcall @(#)esbbcall 43.12 of 12/1/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.TH esbbcall D3
.IX "\f4esbbcall\fP(D3)"
.SH NAME
\f4esbbcall\f1 \- call a function when an externally-supplied buffer can be allocated
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ddi.h>
.sp 0.4
toid_t esbbcall(int \f2pri\fP, void (*\f2func\fP)(), long \f2arg\fP);
.ft 1
.ad
.fi
.SS Arguments
.RS 0
.IP "\f2pri\f1" 10n
Priority of the \f4esballoc\fP(D3) allocation request.
.IP "\f2func\f1" 10n
Function to be called when a buffer becomes available.
.IP "\f2arg\f1" 10n
Argument to the function to be called when a buffer becomes available.
.RE
.SH DESCRIPTION
If \f4esballoc\f1(D3) is unable to allocate a message block header
and a data block header to go with its externally supplied data buffer,
the function \f4esbbcall\f1 can be used to schedule the routine \f2func\f1,
to be called with the argument \f2arg\f1 when memory becomes available.
\f4esbbcall\f1, like \f4bufcall\f1(D3),
serves, in effect, as a timeout call of indeterminate length.
.SS "Return Values"
On success, \f4esbbcall\f1 returns a non-zero value
that identifies the scheduling request.
On failure, \f4esbbcall\f1 returns 0.
.SH USAGE
When \f2func\fP runs, all interrupts from STREAMS devices will be blocked.
On multiprocessor systems,
the interrupts will be blocked only on the processor
on which \f2func\fP is running.
\f2func\fP will have no user context and may not call any function that sleeps.
.P
Even when \f2func\fP is called,
\f4esballoc\fP can still fail if another module or driver
had allocated the memory before \f2func\fP was able to call \f4allocb\fP.
.P
The \f2pri\fP argument is no longer used, but is retained
for compatibility.
.P
The non-zero identifier returned by \f4esballoc\fP
may be passed to \f4unbufcall\f1(D3) to cancel the request.
.SS Level
Base or Interrupt.
.SS "Synchronization Constraints"
Does not sleep.
.P
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
.SH REFERENCES
.na
\f4allocb\fP(D3),
\f4bufcall\fP(D3),
\f4esballoc\fP(D3),
\f4itimeout\fP(D3),
\f4unbufcall\fP(D3)
.ad