Plan 9 from Bell Labs’s /usr/web/sources/plan9/acme/bin/source/acd/outline

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


acd is composed of four procs

wineventproc (win.c:/^wineventproc)
	reads acme window events, sends them along w->cevent.

cdstatusproc (mmc.c:/^cdstatusproc)
	reads cd status once per second, sending
		status updates to d->cstatus.
	detects disk changes, sends new tocs to d->ctocdisp.

cddbproc (cddb.c:/^cddbproc)
	reads tocs from d->cdbreq, if it finds
		translations in the cddb, sends new tocs to d->cdbreply.

eventwatcher (main.c:/^eventwatcher)
	the main event loop.
		reads status from d->cstatus.
		reads events from w->cevent.
		reads new tocs to display from d->ctocdisp.
		sends new tocs to translate to d->cdbreq.
		reads new translated tocs from d->cdbreply.

an interesting bug in the original design:
	both cdstatusproc and the eventwatcher proc
	issue scsi commands.  (the eventwatcher responds to
	things such as Play, Stop, etc., as well as advancing the track.)

	the sd(3) driver did not expect overlapped commands,
	and crashed.

	this has been fixed by making the scsi(2) commands threadsafe,
	and making the sd(3) driver more robust.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].