Exemplo n.º 1
0
static struct fuse_req *check_interrupt(struct fuse_ll *f, struct fuse_req *req)
{
    struct fuse_req *curr;

    for (curr = f->interrupts.next; curr != &f->interrupts; curr = curr->next) {
        if (curr->u.i.unique == req->unique) {
            req->interrupted = 1;
            list_del_req(curr);
            free(curr);
            return NULL;
        }
    }
    curr = f->interrupts.next;
    if (curr != &f->interrupts) {
        list_del_req(curr);
        list_init_req(curr);
        return curr;
    } else
        return NULL;
}
Exemplo n.º 2
0
void fuse_free_req(fuse_req_t req)
{
	int ctr;
	struct fuse_ll *f = req->f;

	pthread_mutex_lock(&f->lock);
	req->u.ni.func = NULL;
	req->u.ni.data = NULL;
	list_del_req(req);
	ctr = --req->ctr;
	pthread_mutex_unlock(&f->lock);
	if (!ctr)
		destroy_req(req);
}