Lines Matching refs:ev_queue
1732 struct devx_async_event_queue ev_queue; member
1736 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1738 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1739 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1740 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1741 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1742 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1756 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1798 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1806 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1807 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1808 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1810 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1859 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1861 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1897 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2732 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2737 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2739 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2740 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2746 ev_queue->poll_wait, in devx_async_cmd_event_read()
2747 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2748 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2752 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2753 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2754 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2759 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2765 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2769 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2770 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2777 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2786 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2789 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2791 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2792 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2794 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2796 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2928 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2931 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2932 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2933 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2934 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2938 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2940 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2944 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()