Logo Search packages:      
Sourcecode: fuse version File versions  Download package

void fuse_req_interrupt_func ( fuse_req_t  req,
fuse_interrupt_func_t  func,
void *  data 
)

Register/unregister callback for an interrupt

If an interrupt has already happened, then the callback function is called from within this function, hence it's not possible for interrupts to be lost.

Parameters:
req request handle
func the callback function or NULL for unregister data user data passed to the callback function

Definition at line 1057 of file fuse_lowlevel.c.

References fuse_req_interrupt_func(), fuse_req::interrupted, fuse_req::lock, fuse_req::ni, and fuse_req::u.

Referenced by fuse_req_interrupt_func().

{
      pthread_mutex_lock(&req->lock);
      req->u.ni.func = func;
      req->u.ni.data = data;
      if (req->interrupted && func)
            func(req, data);
      pthread_mutex_unlock(&req->lock);
}


Generated by  Doxygen 1.6.0   Back to index