summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/file.h
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-07-06 20:06:36 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-07-06 20:06:36 +0000
commit34bbfacafcb71253440a830bed3e6d1d937c3919 (patch)
treed725269d1c6e34c40408bab5da67989a7da06f4d /usr.bin/aucat/file.h
parenta98a572668fcd29fe95b34ebeba73e67326189f1 (diff)
Try to detect busy loops caused by misbehaving audio drivers
or hardware. If a busy loop is found, then close the device that caused the loop.
Diffstat (limited to 'usr.bin/aucat/file.h')
-rw-r--r--usr.bin/aucat/file.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/aucat/file.h b/usr.bin/aucat/file.h
index 4c7a1c1607b..5431025bd56 100644
--- a/usr.bin/aucat/file.h
+++ b/usr.bin/aucat/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.9 2009/09/27 11:51:20 ratchov Exp $ */
+/* $OpenBSD: file.h,v 1.10 2010/07/06 20:06:35 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -56,6 +56,10 @@ struct file {
#define FILE_RINUSE 0x20 /* inside rproc->ops->in() */
#define FILE_WINUSE 0x40 /* inside wproc->ops->out() */
unsigned state; /* one of above */
+#ifdef DEBUG
+#define FILE_MAXCYCLES 20
+ unsigned cycles; /* number of POLLIN/POLLOUT events */
+#endif
char *name; /* for debug purposes */
struct aproc *rproc, *wproc; /* reader and/or writer */
LIST_ENTRY(file) entry;