Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   thorpej
Date:           Wed Jan  1 21:09:12 UTC 2020

Modified Files:
        src/sys/dev: clock_subr.h
        src/sys/kern: init_main.c kern_todr.c

Log Message:
First steps towards properly serializing access to the TOD clock.
- Add a mutex around the TODR, and provide lock/unlock/lock-owned
  functions to manipulate it.
- Rename inittodr() to todr_set_systime() and resettodr() to
  todr_save_systime() to better reflect what they do.  These functions
  are intended to be called with the TODR lock held, which will allow
  for a pattern like:
        -> todr_lock()
        -> todr_save_systime()
        -> [do machine-dependent stuff to sleep/suspend]
        -> [magically awaken]
        -> todr_set_systime(...)
        -> todr_unlock()
- Provide historically-named wrappers inittodr() and resettodr() that
  do the dance of acquiring / releasing the lock around the actual
  substance.

NOTE: resettodr()'s use of the TODR lock is currently disabled (and
todr_save_systime() does not assert it's held) until such time as
issues around shutdown / reboot under duress can be addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/clock_subr.h
cvs rdiff -u -r1.514 -r1.515 src/sys/kern/init_main.c
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/kern_todr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index