reactos/drivers/network/afd/doc/simple_select.txt

48 lines
1.2 KiB
Text
Raw Normal View History

ActivePoll -> Timer, Dpc, Handles
FCB -> Polls Involved In ...
What poll needs to do:
Accumulate:
for each fcb
If error is set, check error condition on fcb on entry
If writable is set, check fcb on entry for zero send content
If readable is set, check fcb has nonzero read content
If any handle was not valid, complete fail
If any of the above checks were true, complete success
Otherwise:
make an active poll object
for each fcb, make a poll entry
chain the poll entry to the fcb
set summary bits in fcb state for polling (what must be polled)
chain the active poll object to the device ext
set timer and dpc
pending
complete select:
for each fcb
find the poll entry in the fcb and unchain it
rescan poll bits for this fcb
get irp from poll object, and deallocate poll object
complete irp
select timeout:
Find the poll object in the device ext chain and unchain it
complete select with timeout
fcb send complete and connect complete:
if no more send irps and send bit set in summary
find each poll entry with send bit set and complete select with (1) on it
fcb recv complete:
if fcb has recv data and recv bit set in summary
find each poll entry with recv bit set and complete select with (1) on it