Lines Matching refs:qe
1093 static void queue_element_wakeup(struct fuse *f, struct lock_queue_element *qe)
1097 if (!qe->path1) {
1099 if (get_node(f, qe->nodeid1)->treelock == 0)
1100 pthread_cond_signal(&qe->cond);
1105 if (qe->done)
1108 if (!qe->path2) {
1109 err = try_get_path(f, qe->nodeid1, qe->name1, qe->path1,
1110 qe->wnode1, true);
1112 err = try_get_path2(f, qe->nodeid1, qe->name1, qe->nodeid2,
1113 qe->name2, qe->path1, qe->path2, qe->wnode1,
1114 qe->wnode2);
1120 qe->err = err;
1121 qe->done = true;
1122 pthread_cond_signal(&qe->cond);
1127 struct lock_queue_element *qe;
1129 for (qe = f->lockq; qe != NULL; qe = qe->next)
1130 queue_element_wakeup(f, qe);
1152 static void queue_path(struct fuse *f, struct lock_queue_element *qe)
1156 qe->done = false;
1157 pthread_cond_init(&qe->cond, NULL);
1158 qe->next = NULL;
1160 *qp = qe;
1163 static void dequeue_path(struct fuse *f, struct lock_queue_element *qe)
1167 pthread_cond_destroy(&qe->cond);
1168 for (qp = &f->lockq; *qp != qe; qp = &(*qp)->next);
1169 *qp = qe->next;
1172 static int wait_path(struct fuse *f, struct lock_queue_element *qe)
1174 queue_path(f, qe);
1177 pthread_cond_wait(&qe->cond, &f->lock);
1178 } while (!qe->done);
1180 dequeue_path(f, qe);
1182 return qe->err;
1193 struct lock_queue_element qe = {
1200 err = wait_path(f, &qe);
1305 struct lock_queue_element qe = {
1318 err = wait_path(f, &qe);
1374 struct lock_queue_element qe = {
1379 queue_path(f, &qe);
1382 pthread_cond_wait(&qe.cond, &f->lock);
1385 dequeue_path(f, &qe);