1
2
3
4   ActivePoll -> Timer, Dpc, Handles
5
6
7   FCB -> Polls Involved In ...
8
9
10What poll needs to do:
11 Accumulate:
12  for each fcb
13   If error is set, check error condition on fcb on entry
14   If writable is set, check fcb on entry for zero send content
15   If readable is set, check fcb has nonzero read content
16
17 If any handle was not valid, complete fail
18
19 If any of the above checks were true, complete success
20 Otherwise:
21  make an active poll object
22  for each fcb, make a poll entry
23   chain the poll entry to the fcb
24   set summary bits in fcb state for polling (what must be polled)
25  chain the active poll object to the device ext
26  set timer and dpc
27  pending
28
29complete select:
30 for each fcb
31  find the poll entry in the fcb and unchain it
32  rescan poll bits for this fcb
33 get irp from poll object, and deallocate poll object
34 complete irp
35
36select timeout:
37 Find the poll object in the device ext chain and unchain it
38 complete select with timeout
39
40fcb send complete and connect complete:
41 if no more send irps and send bit set in summary
42  find each poll entry with send bit set and complete select with (1) on it
43
44fcb recv complete:
45 if fcb has recv data and recv bit set in summary
46  find each poll entry with recv bit set and complete select with (1) on it
47
48