spkr.c (766) | spkr.c (809) |
---|---|
1/* 2 * spkr.c -- device driver for console speaker 3 * 4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> 6 * | 1/* 2 * spkr.c -- device driver for console speaker 3 * 4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> 6 * |
7 * $Id: spkr.c,v 1.4 1993/11/09 02:32:30 ache Exp $ | 7 * $Id: spkr.c,v 1.5 1993/11/15 01:33:11 ache Exp $ |
8 */ 9 10#include "speaker.h" 11 12#if NSPEAKER > 0 13 14#include "param.h" 15#include "systm.h" --- 68 unchanged lines hidden (view full) --- 84 outb(PPI, inb(PPI) | PPI_SPKR); 85 86 /* 87 * Set timeout to endtone function, then give up the timeslice. 88 * This is so other processes can execute while the tone is being 89 * emitted. 90 */ 91 while ((error = tsleep((caddr_t)&endtone, | 8 */ 9 10#include "speaker.h" 11 12#if NSPEAKER > 0 13 14#include "param.h" 15#include "systm.h" --- 68 unchanged lines hidden (view full) --- 84 outb(PPI, inb(PPI) | PPI_SPKR); 85 86 /* 87 * Set timeout to endtone function, then give up the timeslice. 88 * This is so other processes can execute while the tone is being 89 * emitted. 90 */ 91 while ((error = tsleep((caddr_t)&endtone, |
92 SPKRPRI | PCATCH, "spkrtone", ticks)) == ERESTART) | 92 SPKRPRI | PCATCH, "spkrtn", ticks)) == ERESTART) |
93 ; 94 outb(PPI, inb(PPI) & ~PPI_SPKR); 95 96 if (error == EWOULDBLOCK) 97 error = 0; 98 return error; 99} 100 --- 6 unchanged lines hidden (view full) --- 107 * Set timeout to endrest function, then give up the timeslice. 108 * This is so other processes can execute while the rest is being 109 * waited out. 110 */ 111#ifdef DEBUG 112 (void) printf("rest: %d\n", ticks); 113#endif /* DEBUG */ 114 while ((error = tsleep((caddr_t)&endrest, | 93 ; 94 outb(PPI, inb(PPI) & ~PPI_SPKR); 95 96 if (error == EWOULDBLOCK) 97 error = 0; 98 return error; 99} 100 --- 6 unchanged lines hidden (view full) --- 107 * Set timeout to endrest function, then give up the timeslice. 108 * This is so other processes can execute while the rest is being 109 * waited out. 110 */ 111#ifdef DEBUG 112 (void) printf("rest: %d\n", ticks); 113#endif /* DEBUG */ 114 while ((error = tsleep((caddr_t)&endrest, |
115 SPKRPRI | PCATCH, "spkrrest", ticks)) == ERESTART) | 115 SPKRPRI | PCATCH, "spkrrs", ticks)) == ERESTART) |
116 ; 117 if (error == EWOULDBLOCK) 118 error = 0; 119 return error; 120} 121 122/**************** PLAY STRING INTERPRETER BEGINS HERE ********************** 123 * --- 436 unchanged lines hidden --- | 116 ; 117 if (error == EWOULDBLOCK) 118 error = 0; 119 return error; 120} 121 122/**************** PLAY STRING INTERPRETER BEGINS HERE ********************** 123 * --- 436 unchanged lines hidden --- |