freebsd-dev/sys/compat
Bill Paul 0621191ab9 Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver
works again.

This driver uses NdisScheduleWorkItem(), and we have to take special steps
to insure that its workitems don't collide with any of the other workitems
used by the NDISulator. In particular, if one of the driver's work jobs
blocks, it can prevent NdisMAllocateSharedMemoryAsync() from completing
when expected.

The original hack to fix this was to have NdisMAllocateSharedMemoryAsync()
defer its work to the DPC queue instead of the general task queue. To
fix it now, I decided to add some additional workitem threads. (There's
supposed to be a pool of worker threads in Windows anyway.) Currently,
there are 4. There should be at least 2. One is reserved for the legacy
ExQueueWorkItem() API, while the others are used in round-robin by the
IoQueueWorkItem() API. NdisMAllocateSharedMemoryAsync() uses the latter
API while NdisScheduleWorkItem() uses the former, so the deadlock is
avoided.

Fixed NdisMRegisterDevice()/NdisMDeregisterDevice() to work a little
more sensibly with the new driver_object/device_object framework. It
doesn't really register a working user-mode interface, but the existing
code was completely wrong for the new framework.

Fixed a couple of bugs dealing with the cancellation of events and
DPCs. When cancelling an event that's still on the timer queue (i.e.
hasn't expired yet), reset dh_inserted in its dispatch header to FALSE.
Previously, it was left set to TRUE, which would make a cancelled
timer appear to have not been cancelled. Also, when removing a DPC
from a queue, reset its list pointers, otherwise a cancelled DPC
might mistakenly be treated as still pending.

Lastly, fix the behavior of ntoskrnl_wakeup() when dealing with
objects that have nobody waiting on them: sync event objects get
their signalled state reset to FALSE, but notification objects
should still be set to TRUE.
2005-05-19 04:44:26 +00:00
..
freebsd32 - Use a custom version of copyinuio() to implement readv/writev using 2005-03-31 22:58:13 +00:00
ia32 Fix 32 bit signals on amd64. It turns out that I was sign extending 2005-04-05 22:41:49 +00:00
linprocfs Always produce cpuX entries, even in the case when there is only one CPU 2005-03-06 22:28:14 +00:00
linux - Pass the ISOPEN flag to namei so filesystems will know we're about to 2005-04-27 09:05:19 +00:00
ndis Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +00:00
netbsd Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
pecoff remove dead code 2005-02-22 01:26:48 +00:00
svr4 - Change the vm_mmap() function to accept an objtype_t parameter specifying 2005-04-01 20:00:11 +00:00