RTC support.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 23 Aug 2008 03:52:54 +0000 (03:52 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 23 Aug 2008 03:52:54 +0000 (03:52 +0000)
commit0fd3a243b790dd1cfc9e0a40c57dddde56cf344d
treeeafd9aa4cd5158a2b41c6ba66426484dca6b133d
parented04361f6ec91e4f0db1550c2cc487a461b2d17b
RTC support.

Adapted from Anthony Romano's patch with the following changes:

        * Style adjusted to fit rest of Pintos.

        * Don't modify the RTC registers.  It shouldn't be necessary.
          We shouldn't need any initialization in fact.

        * Drop rtc_set_time stub.

        * Do handle time advancing while reading the RTC registers in
          rtc_get_time, using the strategy from Linux.

        * Fix leap year handling: adding (year / 4) * 24 * 60 * 60 is
          wrong for first 2 months of a leap year; the test (year & 4)
          should be (year % 4).

        * Simplify month code.

        * Drop enable_rtc_int, disable_rtc_int, rtc_updating that are
          not needed.

        * Update documentation.
doc/bibliography.texi
doc/threads.texi
specs/mc146818a.pdf [new file with mode: 0644]
src/Makefile.build
src/devices/rtc.c [new file with mode: 0644]
src/devices/rtc.h [new file with mode: 0644]
src/threads/init.c
src/utils/pintos