STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
172
NAME
esbbcall () – Call a function when a caller-supplied buffer can be allocated.
SYNOPSIS
#include <sys/stream.h>
toid_t esbbcall(int pri, void (*bufcall_fcn_t), long bufcall_arg_t);
PARAMETERS
pri
It is no longer used. This parameter is provided only for portability purposes.
bufcall_fcn_t
Address of function to be called when requested memory is available.
bufcall_arg_t
Pointer to argument list to be passed to the function pointed to by bufcall_fcn_t.
DESCRIPTION
This function is used when an esballoc() request fails, and the caller notified as and when the memory
becomes available. In effect, esbbcall() invokes the function pointed to by bufcall_fcn_t whenever
memory becomes available.
RETURN VALUES
On success, esbbcall() returns a non-zero value that identifies the scheduling request. On failure,
esbbcall() returns 0 and the caller supplied bufcall_fcn_t function will not be executed.
CONSTRAINTS
esbbcall() can be called from thread or interrupt context. Spinlocks of STREAMS/UX user lock orders can
be held across esbbcall(). STREAMS raises the SPL level before invoking the callback function
bufcall_fcn_t hence, the callback function should not block.