sndio/sndiod/siofile.h

47 lines
1.3 KiB
C
Raw Normal View History

2012-09-02 17:13:30 -05:00
/* $OpenBSD$ */
/*
2012-11-10 07:58:53 -06:00
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
2012-09-02 17:13:30 -05:00
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef SIOFILE_H
#define SIOFILE_H
2013-01-05 16:21:36 -06:00
#include "file.h"
2012-09-02 17:13:30 -05:00
struct dev;
2013-09-14 04:36:38 -05:00
struct dev_sio {
2012-11-02 06:43:43 -05:00
struct sio_hdl *hdl;
unsigned int todo;
#ifdef DEBUG
long long wtime, utime;
long long sum_wtime, sum_utime;
int pused, rused, events;
#endif
struct file *file;
2012-11-02 07:19:35 -05:00
#define DEV_SIO_READ 0
#define DEV_SIO_CYCLE 1
#define DEV_SIO_WRITE 2
2012-11-02 06:48:50 -05:00
int cstate;
2013-01-05 16:21:36 -06:00
struct timo watchdog;
2012-11-02 06:43:43 -05:00
};
2012-11-02 07:19:35 -05:00
int dev_sio_open(struct dev *);
void dev_sio_close(struct dev *);
void dev_sio_log(struct dev *);
void dev_sio_start(struct dev *);
void dev_sio_stop(struct dev *);
2012-09-02 17:13:30 -05:00
#endif /* !defined(SIOFILE_H) */