esbbcall(D3)
esbbcall - call a function when an externally-supplied buffer can be allocated
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME esbbcall - call a function when an externally-supplied buffer can be allocated SYNOPSIS #include <sys/types.h> #include <sys/stream.h> #include <sys/ddi.h> toid_t esbbcall(int pri, void (*func)(), long arg); Arguments pri Priority of the esballoc(D3) allocation request. func Function to be called when a buffer becomes available. arg Argument to the function to be called when a buffer becomes available. DESCRIPTION If esballoc(D3) is unable to allocate a message block header and a data block header to go with its externally supplied data buffer, the function esbbcall can be used to schedule the routine func, to be called with the argument arg when memory becomes available. esbbcall, like bufcall(D3), serves, in effect, as a timeout call of indeterminate length. Return Values On success, esbbcall returns a non-zero value that identifies the scheduling request. On failure, esbbcall returns 0. USAGE When func runs, all interrupts from STREAMS devices will be blocked. On multiprocessor systems, the interrupts will be blocked only on the processor on which func is running. func will have no user context and may not call any function that sleeps. Even when func is called, esballoc can still fail if another module or driver had allocated the memory before func was able to call allocb. The pri argument is no longer used, but is retained for compatibility. The non-zero identifier returned by esballoc may be passed to unbufcall(D3) to cancel the request. Level Base or Interrupt. Synchronization Constraints Does not sleep. Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function. REFERENCES allocb(D3), bufcall(D3), esballoc(D3), itimeout(D3), unbufcall(D3)