simple_select.txt
来自「一个类似windows」· 文本 代码 · 共 48 行
TXT
48 行
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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?