Lines Matching refs:ev_queue

1747 	struct devx_async_event_queue	ev_queue;  member
1751 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1753 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1754 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1755 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1756 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1757 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1771 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1813 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1821 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1822 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1823 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1825 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1874 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1876 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1912 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2747 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2752 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2754 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2755 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2761 ev_queue->poll_wait, in devx_async_cmd_event_read()
2762 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2763 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2767 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2768 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2769 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2774 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2780 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2784 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2785 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2792 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2801 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2804 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2806 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2807 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2809 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2811 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2943 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2946 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2947 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2948 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2949 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2953 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2955 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2959 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()