Lines Matching refs:ev_queue

1684 	struct devx_async_event_queue	ev_queue;  member
1688 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1690 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1691 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1692 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1693 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1694 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1708 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1750 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1758 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1759 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1760 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1762 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1811 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1813 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1849 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2602 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2607 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2609 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2610 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2616 ev_queue->poll_wait, in devx_async_cmd_event_read()
2617 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2618 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2622 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2623 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2624 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2629 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2635 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2639 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2640 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2647 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2656 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2659 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2661 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2662 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2664 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2666 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2800 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2803 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2804 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2805 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2806 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2810 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2812 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2816 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()