/* Copyright (C) 2008 Emmanuel Varoquaux This file is part of XOS. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef TTY_QUEUE_H #define TTY_QUEUE_H struct tty_queue_struct; void tty_queue_init(struct tty_queue_struct *tty_queue); unsigned int tty_queue_get_end(const struct tty_queue_struct *tty_queue); int tty_queue_is_empty(const struct tty_queue_struct *tty_queue); int tty_queue_is_full(const struct tty_queue_struct *tty_queue); int tty_queue_get_last(const struct tty_queue_struct *tty_queue, char *c); int tty_queue_get(const struct tty_queue_struct *tty_queue, unsigned int *pos, char *c); int tty_queue_push(struct tty_queue_struct *tty_queue, char c); int tty_queue_pop(struct tty_queue_struct *tty_queue, char *c); void tty_queue_del(struct tty_queue_struct *tty_queue); void tty_queue_clear(struct tty_queue_struct *tty_queue); #endif