Csh confusion: #define HZ 100?

Andy Kegel agk at ihuxq.UUCP
Fri Nov 30 08:56:12 AEST 1984


> We have been doing some major  hacking on csh, particularly in the area
> of  rewriting  the tcsh editor interface. (If you're  interested,  when
> it's done, it'll  edit  in  either  vi or  emacs  style.)
Sounds like ksh(1).

>                                                            However,  in
> tracking down a core-dump bug which affects us only on our Suns, it was
> discovered that that the symbol  HZ, defined in sh.local.h, is #defined
> as 100. Now, obviously, HZ is the ac line frequency; why would it  ever
> be 100? (Has Berkeley got some really strange power requirements?)
Obviously, HZ is not the ac line frequency, but more likely related to
the periodic timer.  The periodic timer is commonly based on the 60 Hz line,
but not always.  (Horn fanfare)  Enter the AT&T 3B computer line.  The
first 3B machine (the AT&T 3B20D computer) was designed to run without
the need for AC power (continuous processing was a requirement, batteries
were the solution).  The designers thought it would be nice if the clock
and scheduler kept running (:-), so they provided a programmable timer.
Given a programmable timer, I can understand why some one would decide to
count 10 millisecond units than 16.66666666666666666666666666666666666666666666
millisecond units.  Now that battery powered machines are becoming more
common, I expect that 60 Hz will become an interesting bit of party trivia
(but then, I can expect dancing elephants and Santa Claus, too).

But why #define HZ 100 ended up in csh is a mystery to me.

	-andy kegel
	just another one of them AT&T Bell Labs people with opinions of his own



More information about the Comp.unix.wizards mailing list