Lines Matching refs:ev_queue
1678 struct devx_async_event_queue ev_queue; member
1682 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1684 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1685 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1686 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1687 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1688 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1702 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1744 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1752 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1753 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1754 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1756 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1805 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1807 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1843 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2577 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2582 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2584 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2585 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2591 ev_queue->poll_wait, in devx_async_cmd_event_read()
2592 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2593 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2597 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2598 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2599 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2604 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2610 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2614 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2615 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2622 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2631 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2634 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2636 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2637 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2639 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2641 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2775 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2778 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2779 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2780 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2781 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2785 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2787 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2791 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()