## Input/Output Device Driver Reference

[prev][next][parent][TOC]

### APM_POLLQUEUE

This function is designed to test function 61 without using semaphore notification. Two threads are created for this purpose. The main thread generates the event (function 40) and goes idle for 100 milliseconds and then checks if the event is picked up by the child running in parallel. If it is not picked up by the child thread then the main thread goes back to idle end repeats the same process. The child thread continuously polls the queue and when it retrieves an event from the queue, it notifies the main thread. The main thread repeats this cycle for max_count times. In general , max_count does not need to be greater than 1. When the main thread is done, it waits for the child thread to complete its execution and it terminates.