Lines Matching refs:ev_queue
1559 struct devx_async_event_queue ev_queue; member
1563 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1565 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1566 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1567 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1568 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1569 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1583 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1625 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1633 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1634 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1635 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1637 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1686 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1688 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1724 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2411 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2416 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2418 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2419 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2425 ev_queue->poll_wait, in devx_async_cmd_event_read()
2426 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2427 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2431 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2432 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2433 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2438 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2444 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2448 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2449 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2456 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2465 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2468 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2470 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2471 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2473 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2475 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2609 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2612 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2613 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2614 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2615 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2619 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2621 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2625 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()