'\" te .\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. .TH esbbcall 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME esbbcall \- call function when buffer is available .SH SYNOPSIS .LP .nf #include \fBbufcall_id_t\fR \fBesbbcall\fR(\fBuint_t\fR \fIpri\fR, \fBvoid\fR (\fI*func\fR)(\fIvoid *arg\fR), \fBvoid\fR(\fIarg\fR)); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIpri\fR\fR .ad .RS 8n .rt Priority of allocation request (to be used by \fBallocb\fR(9F) function, called by \fBesbbcall()\fR). .RE .sp .ne 2 .mk .na \fB\fIfunc\fR\fR .ad .RS 8n .rt Function to be called when buffer becomes available. .RE .sp .ne 2 .mk .na \fB\fIarg\fR\fR .ad .RS 8n .rt Argument to \fIfunc\fR. .RE .SH DESCRIPTION .sp .LP The \fBesbbcall()\fR function, like \fBbufcall\fR(9F), serves as a \fBtimeout\fR(9F) call of indeterminate length. If \fBesballoc\fR(9F) is unable to allocate a message and data block header to go with its externally supplied data buffer, \fBesbbcall()\fR can be used to schedule the routine \fIfunc\fR, to be called with the argument \fIarg\fR when a buffer becomes available. The \fIfunc\fR argument can be a routine that calls \fBesballoc\fR(9F) or it may be another kernel function. .SH RETURN VALUES .sp .LP On success, a \fBbufcall\fR \fBID\fRis returned. On failure, \fB0\fR is returned. The value returned from a successful call should be saved for possible future use with \fBunbufcall()\fR should it become necessary to cancel the \fBesbbcall()\fR request (as at driver close time). .SH CONTEXT .sp .LP The \fBesbbcall()\fR function can be called from user, interrupt, or kernel context. .SH SEE ALSO .sp .LP \fBallocb\fR(9F), \fBbufcall\fR(9F), \fBesballoc\fR(9F), \fBtimeout\fR(9F), \fBdatab\fR(9S), \fBunbufcall\fR(9F) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR \fISTREAMS Programming Guide\fR