what does the function kiswapthread() do?

Hi,

What does this function do and why is this function used for?

I see my file system filter driver on windows 2000 with anti virus getting
freezed and when I used !stack command from debugger I see all the threads
in blocked state and the last call was KiSwapThread+0xc5.

Any information is helpful.

Thanks,
Kedar.

KiSwapThread selects the next thread to be executed on
a processor and performs context switch to the thread.

It is normally called e.g. when you call any of the wait
functions, if the waited object is not available
(e.g. resource cannot be acquired immediately)

L.