xref: /plan9/acme/bin/source/acd/outline (revision 9a747e4fd48b9f4522c70c07e8f882a15030f964)
1acd is composed of four procs
2
3wineventproc (win.c:/^wineventproc)
4	reads acme window events, sends them along w->cevent.
5
6cdstatusproc (mmc.c:/^cdstatusproc)
7	reads cd status once per second, sending
8		status updates to d->cstatus.
9	detects disk changes, sends new tocs to d->ctocdisp.
10
11cddbproc (cddb.c:/^cddbproc)
12	reads tocs from d->cdbreq, if it finds
13		translations in the cddb, sends new tocs to d->cdbreply.
14
15eventwatcher (main.c:/^eventwatcher)
16	the main event loop.
17		reads status from d->cstatus.
18		reads events from w->cevent.
19		reads new tocs to display from d->ctocdisp.
20		sends new tocs to translate to d->cdbreq.
21		reads new translated tocs from d->cdbreply.
22
23an interesting bug in the original design:
24	both cdstatusproc and the eventwatcher proc
25	issue scsi commands.  (the eventwatcher responds to
26	things such as Play, Stop, etc., as well as advancing the track.)
27
28	the sd(3) driver did not expect overlapped commands,
29	and crashed.
30
31	this has been fixed by making the scsi(2) commands threadsafe,
32	and making the sd(3) driver more robust.
33