DevHelp TCYield

This service is similar to the DevHlp_Yield, except that TCYield yields the CPU only to a time-critical thread if one is available.

C
USHORT APIENTRY DevHelp_TCYield

Assembler
 MOV  DL,DevHlp_TCYield

CALL [Device_Help] 

C
None.

Assembler
None.

C
Success Indicator: None.

Possible errors: None.

Assembler
None.

Remarks
This function is a subset of the Yield function; it is not necessary for the physical device driver to do both a Yield and a TCYield. Physical device drivers, particularly those that perform program I/O on long strings of data or that poll a device, are the one part of the kernel that can use a large amount of time in the CPU. These physical device drivers should periodically check the TCYield flag and call the TCYield function to yield the CPU to a time-critical thread. The location of the TCYield flag is obtained from a call to GetDOSVar. For performance reasons, the physical device driver checks the TCYield Flag once every 3 milliseconds. If the flag is set, then the physical device driver calls TCYield. Because the physical device driver can relinquish control of the CPU, it should not assume that the state of the interrupt flag is preserved across a call to TCYield.

C

 * 1) include "dhcalls.h"

USHORT APIENTRY DevHelp_TCYield 