Xref: utzoo unix-pc.general:1512 comp.sys.att:4471 Path: utzoo!attcan!uunet!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: Those LEDs in the UNIXpc, one last time; (HwNote01) Summary: (*MCR_ADDR = mcr_save = foo) is OkeyDokey. Keywords: 7300 LED drivers kernel Message-ID: <4975@cbmvax.UUCP> Date: 11 Oct 88 18:01:46 GMT References: <357@uncle.UUCP> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 20 In article <357@uncle.UUCP> jbm@uncle.UUCP (John B. Milton) writes: >As as an example, "led_on(LED0)" produces the code: > and.w &65279,mcr_save > mov.w mcr_save,4849664 >Note that since there is no locking here, an interrupt routine that uses the >MCR could run between these two instructions. But also note that this is not a problem if the interrupt routines only *write* to the mcr and mcr_save (which should be the case) because mcr_save is updated first. The only potential problem is if an interrupt routine *reads* mcr_save assuming that the hardware is in the same state. I don't know of any need to read mcr_save, so I doubt that this is ever done. -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!elgar!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com