Just for the record, Michael Barabanov did this in RTLinux from before
kd_mksound was a function pointer in 1995. Michael had an optimization
attempt using channel 1 for a while, but on very slow machines this
was not sufficient and he went back to channel 2. Of course, the
fundamental problem is that board designers keep putting an 1920s
part in machines built in 2001.
Here's the comment from the RTLinux 0.5 patch -- all available on the archives
on rtlinux.com.
+/* The main procedure; resets the 8254 timer to generate an interrupt. The
+ * tricky part is to keep the global time while reprogramming it. We latch
+ * counters 0 and 2 atomically before and after reprogramming to figure it out.
+ */
-- --------------------------------------------------------- Victor Yodaiken Finite State Machine Labs: The RTLinux Company. www.fsmlabs.com www.rtlinux.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/