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 $
10 #include <sys/param.h>
11 #include <sys/systm.h>
14 #include <sys/fcntl.h>
15 #include <sys/filio.h>
17 #include <sys/kernel.h>
19 #include <sys/malloc.h>
21 #include <sys/signalvar.h>
23 #include <sys/soundcard.h>
25 #include <i386/isa/isa_device.h>
28 #define DELAY(x) tenmicrosec(x)
29 typedef struct uio snd_rw_buf;
37 unsigned long get_time(void);
41 typedef caddr_t ioctl_arg;
43 typedef struct sound_os_info {
49 * The following macro calls tsleep. It should be implemented such that
50 * the process is resumed if it receives a signal.
51 * The q parameter is a wait_queue defined with DEFINE_WAIT_QUEUE(),
52 * and the second is a workarea parameter. The third is a timeout
53 * in ticks. Zero means no timeout.
55 #define DO_SLEEP(q, f, time_limit) \
59 flag=tsleep(&q, (PRIBIO-5)|PCATCH, "sndint", time_limit); \
60 f.mode &= ~WK_SLEEP; \
61 if (flag == EWOULDBLOCK) { \
62 f.mode |= WK_TIMEOUT; \
68 #define DO_SLEEP1(q, f, time_limit) \
72 flag=tsleep(&q, (PRIBIO-5)|PCATCH, "snd1", time_limit); \
73 f.mode &= ~WK_SLEEP; \
74 if (flag == EWOULDBLOCK) { \
75 f.mode |= WK_TIMEOUT; \
81 #define DO_SLEEP2(q, f, time_limit) \
85 flag=tsleep(&q, (PRIBIO-5)|PCATCH, "snd2", time_limit); \
86 f.mode &= ~WK_SLEEP; \
87 if (flag == EWOULDBLOCK) { \
88 f.mode |= WK_TIMEOUT; \
94 #define PROCESS_ABORTING( f) (f.aborting || CURSIG(curproc))
95 #define TIMED_OUT( f) (f.mode & WK_TIMEOUT)
98 typedef struct proc select_table;
99 extern struct selinfo selinfo[];