linux/drivers/media/pci/ivtv/ivtv-queue.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    buffer queues.
    Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
    Copyright (C) 2004  Chris Kennedy <[email protected]>
    Copyright (C) 2005-2007  Hans Verkuil <[email protected]>

 */

#include "ivtv-driver.h"
#include "ivtv-queue.h"

int ivtv_buf_copy_from_user(struct ivtv_stream *s, struct ivtv_buffer *buf, const char __user *src, int copybytes)
{}

void ivtv_buf_swap(struct ivtv_buffer *buf)
{}

void ivtv_queue_init(struct ivtv_queue *q)
{}

void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q)
{}

struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q)
{}

static void ivtv_queue_move_buf(struct ivtv_stream *s, struct ivtv_queue *from,
		struct ivtv_queue *to, int clear)
{}

/* Move 'needed_bytes' worth of buffers from queue 'from' into queue 'to'.
   If 'needed_bytes' == 0, then move all buffers from 'from' into 'to'.
   If 'steal' != NULL, then buffers may also taken from that queue if
   needed, but only if 'from' is the free queue.

   The buffer is automatically cleared if it goes to the free queue. It is
   also cleared if buffers need to be taken from the 'steal' queue and
   the 'from' queue is the free queue.

   When 'from' is q_free, then needed_bytes is compared to the total
   available buffer length, otherwise needed_bytes is compared to the
   bytesused value. For the 'steal' queue the total available buffer
   length is always used.

   -ENOMEM is returned if the buffers could not be obtained, 0 if all
   buffers where obtained from the 'from' list and if non-zero then
   the number of stolen buffers is returned. */
int ivtv_queue_move(struct ivtv_stream *s, struct ivtv_queue *from, struct ivtv_queue *steal,
		    struct ivtv_queue *to, int needed_bytes)
{}

void ivtv_flush_queues(struct ivtv_stream *s)
{}

int ivtv_stream_alloc(struct ivtv_stream *s)
{}

void ivtv_stream_free(struct ivtv_stream *s)
{}