unbufcall(D3)
unbufcall - cancel a pending bufcall request
As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.
NAME unbufcall - cancel a pending bufcall request SYNOPSIS #include <sys/stream.h> #include <sys/ddi.h> void unbufcall(toid_t id); Arguments id Non-zero identifier returned from a prior call to bufcall(D3) or esbbcall(D3). DESCRIPTION unbufcall cancels the pending bufcall or esbbcall request specified by id. Return Values None USAGE If unbufcall is called while any function called by the pending bufcall or esbbcall request is running, the call to unbufcall has no effect. Level Base or Interrupt. Synchronization Constraints Does not sleep. Driver-defined basic locks, read/write locks, and sleep locks may not be held across calls to this function. Example See bufcall for the other half of this example. In the module close routine, if a bufcall request is pending (line 14), we cancel it (line 15). Otherwise, if a itimeout request is pending (line 16), we cancel it (line 17). Then the m_type field in the module's private data structure is set to 0, indicating no pending bufcall or itimeout. 1 struct mod { 2 long m_id; 3 char m_type; ... 4 }; 5 #define TIMEOUT 1 6 #define BUFCALL 2 ... 7 modclose(q, flag, crp) 8 queue_t *q; 9 int flag; 10 cred_t *crp; 11 { 12 struct mod *modp; 13 modp = (struct mod *)q->q_ptr; 14 if (modp->m_type == BUFCALL) 15 unbufcall(modp->m_id); 16 else if (modp->m_type == TIMEOUT) 17 untimeout(modp->m_id); 18 modp->m_type = 0; ... REFERENCES bufcall(D3), esbbcall(D3)