Source-Changes archive

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

CVS commit: src/sys/dev/pad



Module Name:    src
Committed By:   riastradh
Date:           Mon Jun 14 00:21:09 UTC 2021

Modified Files:
        src/sys/dev/pad: pad.c

Log Message:
pad(4): Some incomplete tidying.

- Put pseudo-device softc setup/teardown back in pad_attach/detach,
  not in the cdev/fops operations which are about file descriptors.
- Remove unnecessary sc_dying flag.
- Omit needless config_deactivate(sc->sc_audiodev); the only effect
  of this is already done by config_detach anyway, which is done in
  the same context.
- Issue config_detach_children and free softc stuff in the right
  order.
- Omit needless `if (sc == NULL) return ENXIO'.

Survives eight parallel t_mixerctl tests many times over on an
8-thread/4-core machine.

XXX TODO:
- Remove padconfig; it is not appropriate to hold a mutex over
  sleeping allocation or autoconf config_attach operations.  This
  should be done another way.
- Fix agreement of sc_condvar with locks: is it sc_cond_lock or
  sc_intr_lock?  Can't be both; unclear why both exist.
- Determine whether both cdev and fops are really needed -- it is
  confusing to have two types of paths into all this logic, and it
  seems to me only one of them should be necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pad/pad.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