[BACK]Return to siofile.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Annotation of src/usr.bin/sndiod/siofile.h, Revision 1.2

1.2     ! ratchov     1: /*     $OpenBSD: siofile.h,v 1.1 2012/11/23 07:03:28 ratchov Exp $     */
1.1       ratchov     2: /*
                      3:  * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
                      4:  *
                      5:  * Permission to use, copy, modify, and distribute this software for any
                      6:  * purpose with or without fee is hereby granted, provided that the above
                      7:  * copyright notice and this permission notice appear in all copies.
                      8:  *
                      9:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     16:  */
                     17: #ifndef SIOFILE_H
                     18: #define SIOFILE_H
                     19:
1.2     ! ratchov    20: #include "file.h"
        !            21:
1.1       ratchov    22: struct dev;
                     23:
                     24: struct siofile_ {
                     25:        struct sio_hdl *hdl;
                     26:        unsigned int todo;
                     27: #ifdef DEBUG
                     28:        long long wtime, utime;
                     29:        long long sum_wtime, sum_utime;
                     30:        int pused, rused, events;
                     31: #endif
                     32:        struct file *file;
                     33: #define DEV_SIO_READ   0
                     34: #define DEV_SIO_CYCLE  1
                     35: #define DEV_SIO_WRITE  2
                     36:        int cstate;
1.2     ! ratchov    37:        struct timo watchdog;
1.1       ratchov    38: };
                     39:
                     40: int dev_sio_open(struct dev *);
                     41: void dev_sio_close(struct dev *);
                     42: void dev_sio_log(struct dev *);
                     43: void dev_sio_start(struct dev *);
                     44: void dev_sio_stop(struct dev *);
                     45:
                     46: #endif /* !defined(SIOFILE_H) */