Lines Matching refs:ev_queue

1558 	struct devx_async_event_queue	ev_queue;  member
1562 static void devx_init_event_queue(struct devx_async_event_queue *ev_queue) in devx_init_event_queue() argument
1564 spin_lock_init(&ev_queue->lock); in devx_init_event_queue()
1565 INIT_LIST_HEAD(&ev_queue->event_list); in devx_init_event_queue()
1566 init_waitqueue_head(&ev_queue->poll_wait); in devx_init_event_queue()
1567 atomic_set(&ev_queue->bytes_in_use, 0); in devx_init_event_queue()
1568 ev_queue->is_destroyed = 0; in devx_init_event_queue()
1582 devx_init_event_queue(&ev_file->ev_queue); in UVERBS_HANDLER()
1624 struct devx_async_event_queue *ev_queue = &ev_file->ev_queue; in devx_query_callback() local
1632 spin_lock_irqsave(&ev_queue->lock, flags); in devx_query_callback()
1633 list_add_tail(&async_data->list, &ev_queue->event_list); in devx_query_callback()
1634 spin_unlock_irqrestore(&ev_queue->lock, flags); in devx_query_callback()
1636 wake_up_interruptible(&ev_queue->poll_wait); in devx_query_callback()
1685 if (atomic_add_return(cmd_out_len, &ev_file->ev_queue.bytes_in_use) > in UVERBS_HANDLER()
1687 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
1723 atomic_sub(cmd_out_len, &ev_file->ev_queue.bytes_in_use); in UVERBS_HANDLER()
2414 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_read() local
2419 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2421 while (list_empty(&ev_queue->event_list)) { in devx_async_cmd_event_read()
2422 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2428 ev_queue->poll_wait, in devx_async_cmd_event_read()
2429 (!list_empty(&ev_queue->event_list) || in devx_async_cmd_event_read()
2430 ev_queue->is_destroyed))) { in devx_async_cmd_event_read()
2434 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2435 if (ev_queue->is_destroyed) { in devx_async_cmd_event_read()
2436 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2441 event = list_entry(ev_queue->event_list.next, in devx_async_cmd_event_read()
2447 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2451 list_del(ev_queue->event_list.next); in devx_async_cmd_event_read()
2452 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_read()
2459 atomic_sub(event->cmd_out_len, &ev_queue->bytes_in_use); in devx_async_cmd_event_read()
2468 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_poll() local
2471 poll_wait(filp, &ev_queue->poll_wait, wait); in devx_async_cmd_event_poll()
2473 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2474 if (ev_queue->is_destroyed) in devx_async_cmd_event_poll()
2476 else if (!list_empty(&ev_queue->event_list)) in devx_async_cmd_event_poll()
2478 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_poll()
2612 struct devx_async_event_queue *ev_queue = &comp_ev_file->ev_queue; in devx_async_cmd_event_destroy_uobj() local
2615 spin_lock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2616 ev_queue->is_destroyed = 1; in devx_async_cmd_event_destroy_uobj()
2617 spin_unlock_irq(&ev_queue->lock); in devx_async_cmd_event_destroy_uobj()
2618 wake_up_interruptible(&ev_queue->poll_wait); in devx_async_cmd_event_destroy_uobj()
2622 spin_lock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()
2624 &comp_ev_file->ev_queue.event_list, list) { in devx_async_cmd_event_destroy_uobj()
2628 spin_unlock_irq(&comp_ev_file->ev_queue.lock); in devx_async_cmd_event_destroy_uobj()