2 |
- |
1 |
acd is composed of four procs
|
|
|
2 |
|
|
|
3 |
wineventproc (win.c:/^wineventproc)
|
|
|
4 |
reads acme window events, sends them along w->cevent.
|
|
|
5 |
|
|
|
6 |
cdstatusproc (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 |
|
|
|
11 |
cddbproc (cddb.c:/^cddbproc)
|
|
|
12 |
reads tocs from d->cdbreq, if it finds
|
|
|
13 |
translations in the cddb, sends new tocs to d->cdbreply.
|
|
|
14 |
|
|
|
15 |
eventwatcher (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 |
|
|
|
23 |
an 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.
|