freebsd-skq/sys/isa
Alfred Perlstein 85f190e4d1 Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
..
atkbd_isa.c Reinitialize the keyboard after the ACPI resume event. 2001-09-23 08:42:06 +00:00
atkbdc_isa.c Yet another turn of workaround for psm/ACPI/PnP BIOS 2001-09-25 16:59:28 +00:00
atrtc.c revert last commit temporarily due to whining on the lists. 2002-02-26 20:33:41 +00:00
fd.c Disksort will not "munge" requests, BIO_ORDERED or not, so remove 2002-02-22 09:14:06 +00:00
fdreg.h Long promised major enhancement set for the floppy disk driver: 2001-12-15 19:09:04 +00:00
isa_common.c Fix style bugs: 2002-02-24 23:24:01 +00:00
isa_common.h Use the new resource_list_print_type() function. 2001-12-21 21:54:56 +00:00
isa_if.m
isahint.c Hints overhaul: 2001-06-12 09:40:04 +00:00
isareg.h Break out the bus front ends into their own files. Rewrite 2001-10-23 15:17:33 +00:00
isavar.h Rework the ISA PnP driver pnp and the PnP resource parser to fix 2001-09-05 03:54:33 +00:00
orm.c The orm device. This device gobbles up the Option ROMs in the ISA 2001-06-01 20:58:32 +00:00
pnp.c - Do not hang if the resource allocation fails. 2002-02-05 06:52:56 +00:00
pnpparse.c Rework the ISA PnP driver pnp and the PnP resource parser to fix 2001-09-05 03:54:33 +00:00
pnpreg.h
pnpvar.h Rework the ISA PnP driver pnp and the PnP resource parser to fix 2001-09-05 03:54:33 +00:00
ppc.c Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ppcreg.h Convert inb/outb to bus_space. 2001-06-23 06:52:54 +00:00
psm.c Fixes to make select/poll mpsafe. 2002-03-14 01:32:30 +00:00
rtc.h
syscons_isa.c Remove the resume method. It is not necessary any more, because 2001-06-30 10:15:13 +00:00
vga_isa.c KSE Milestone 2 2001-09-12 08:38:13 +00:00