DragonFly BSD
DragonFly kernel List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: My first real attempt at kernel hacking!


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Mar 2004 22:49:11 -0800 (PST)

:Ever since Matt added systimers, my DragonFly console has been lacking
:something: an audible bell.  I'm sure many people don't miss it, but I
:got used to it, especially as feedback when tab-completion fails.  So I
:added a way to make syscons use my soundcard for ringing the bell.
:
:The theory of operation is very simple.  Every time the bell rings, the
:syscons driver makes a byte available on /dev/consolectl.  A userland
:daemon, belld, opens /dev/consolectl and reads from it, which blocks
:until a byte becomes available.  When it does, belld spawns a
:user-specified program (in my case, "/usr/local/bin/madplay ding.mp3"),
:then waits for the next byte in an infinite loop.
:
:Dead simple, but effective, and a good starter project for cutting my
:teeth in the wild and woolly world of kernel programming.
:
:The files are available here:
:
:  http://catseye.webhop.net/projects/belld/
:
:If I get some positive feedback, I'll clean it up and send it to
:submit@.
:
:Thanks to Emiel, Rob, and Samy for the help and encouragement :)
:
:-Chris

   I like the idea!  I'll take a look at the patch tomorrow.  One thing
   I might do (if the code doesn't already do it) is limit the number
   of bells that can build up in the device driver to something reasonable,
   like 2.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]