2 * os.h -- only included by sound_config.h right after local.h
4 * $FreeBSD: src/sys/i386/isa/sound/os.h,v 1.40.2.1 2000/08/03 01:01:27 peter Exp $
5 * $DragonFly: src/sys/i386/isa/sound/Attic/os.h,v 1.4 2003/08/07 21:17:23 dillon Exp $
11 #include <sys/param.h>
12 #include <sys/systm.h>
15 #include <sys/fcntl.h>
16 #include <sys/filio.h>
18 #include <sys/kernel.h>
20 #include <sys/malloc.h>
22 #include <sys/signalvar.h>
24 #include <sys/soundcard.h>
26 #include <bus/isa/i386/isa_device.h>
29 #define DELAY(x) tenmicrosec(x)
30 typedef struct uio snd_rw_buf;
38 unsigned long get_time(void);
42 typedef caddr_t ioctl_arg;
44 typedef struct sound_os_info {
50 * The following macro calls tsleep. It should be implemented such that
51 * the process is resumed if it receives a signal.
52 * The q parameter is a wait_queue defined with DEFINE_WAIT_QUEUE(),
53 * and the second is a workarea parameter. The third is a timeout
54 * in ticks. Zero means no timeout.
56 #define DO_SLEEP(q, f, time_limit) \
60 flag=tsleep(&q, PCATCH, "sndint", time_limit); \
61 f.mode &= ~WK_SLEEP; \
62 if (flag == EWOULDBLOCK) { \
63 f.mode |= WK_TIMEOUT; \
69 #define DO_SLEEP1(q, f, time_limit) \
73 flag=tsleep(&q, PCATCH, "snd1", time_limit); \
74 f.mode &= ~WK_SLEEP; \
75 if (flag == EWOULDBLOCK) { \
76 f.mode |= WK_TIMEOUT; \
82 #define DO_SLEEP2(q, f, time_limit) \
86 flag=tsleep(&q, PCATCH, "snd2", time_limit); \
87 f.mode &= ~WK_SLEEP; \
88 if (flag == EWOULDBLOCK) { \
89 f.mode |= WK_TIMEOUT; \
95 #define PROCESS_ABORTING( f) (f.aborting || CURSIG(curproc))
96 #define TIMED_OUT( f) (f.mode & WK_TIMEOUT)
99 typedef struct proc select_table;
100 extern struct selinfo selinfo[];