~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/core/seq/seq_fifo.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *   ALSA sequencer FIFO
  4  *   Copyright (c) 1998 by Frank van de Pol <fvdpol@coil.demon.nl>
  5  */
  6 #ifndef __SND_SEQ_FIFO_H
  7 #define __SND_SEQ_FIFO_H
  8 
  9 #include "seq_memory.h"
 10 #include "seq_lock.h"
 11 
 12 
 13 /* === FIFO === */
 14 
 15 struct snd_seq_fifo {
 16         struct snd_seq_pool *pool;              /* FIFO pool */
 17         struct snd_seq_event_cell *head;        /* pointer to head of fifo */
 18         struct snd_seq_event_cell *tail;        /* pointer to tail of fifo */
 19         int cells;
 20         spinlock_t lock;
 21         snd_use_lock_t use_lock;
 22         wait_queue_head_t input_sleep;
 23         atomic_t overflow;
 24 
 25 };
 26 
 27 /* create new fifo (constructor) */
 28 struct snd_seq_fifo *snd_seq_fifo_new(int poolsize);
 29 
 30 /* delete fifo (destructor) */
 31 void snd_seq_fifo_delete(struct snd_seq_fifo **f);
 32 
 33 
 34 /* enqueue event to fifo */
 35 int snd_seq_fifo_event_in(struct snd_seq_fifo *f, struct snd_seq_event *event);
 36 
 37 /* lock fifo from release */
 38 #define snd_seq_fifo_lock(fifo)         snd_use_lock_use(&(fifo)->use_lock)
 39 #define snd_seq_fifo_unlock(fifo)       snd_use_lock_free(&(fifo)->use_lock)
 40 
 41 /* get a cell from fifo - fifo should be locked */
 42 int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, struct snd_seq_event_cell **cellp, int nonblock);
 43 
 44 /* free dequeued cell - fifo should be locked */
 45 void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, struct snd_seq_event_cell *cell);
 46 
 47 /* clean up queue */
 48 void snd_seq_fifo_clear(struct snd_seq_fifo *f);
 49 
 50 /* polling */
 51 int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait);
 52 
 53 /* resize pool in fifo */
 54 int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
 55 
 56 /* get the number of unused cells safely */
 57 int snd_seq_fifo_unused_cells(struct snd_seq_fifo *f);
 58 
 59 #endif
 60 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php