/*1* ALSA sequencer Priority Queue2* Copyright (c) 1998 by Frank van de Pol <[email protected]>3*4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*19*/20#ifndef __SND_SEQ_PRIOQ_H21#define __SND_SEQ_PRIOQ_H2223#include "seq_memory.h"242526/* === PRIOQ === */2728struct snd_seq_prioq {29struct snd_seq_event_cell *head; /* pointer to head of prioq */30struct snd_seq_event_cell *tail; /* pointer to tail of prioq */31int cells;32spinlock_t lock;33};343536/* create new prioq (constructor) */37struct snd_seq_prioq *snd_seq_prioq_new(void);3839/* delete prioq (destructor) */40void snd_seq_prioq_delete(struct snd_seq_prioq **fifo);4142/* enqueue cell to prioq */43int snd_seq_prioq_cell_in(struct snd_seq_prioq *f, struct snd_seq_event_cell *cell);4445/* dequeue cell from prioq */46struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f);4748/* return number of events available in prioq */49int snd_seq_prioq_avail(struct snd_seq_prioq *f);5051/* peek at cell at the head of the prioq */52struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq *f);5354/* client left queue */55void snd_seq_prioq_leave(struct snd_seq_prioq *f, int client, int timestamp);5657/* Remove events */58void snd_seq_prioq_remove_events(struct snd_seq_prioq *f, int client,59struct snd_seq_remove_events *info);6061#endif626364