Kernel-Mode Interface to a Communications PDH
The kernel-mode interface to a communications PDH differs from the interface supported for a user-mode process in the following ways:
- Kernel services are used instead of system calls. This means that, for example, the fp_open kernel service is used instead of the open subroutine. The same holds true for the fp_close, fp_ioctl, and fp_write kernel services.
- The ddread entry point, ddselect entry point, and CIO_GET_STAT (Get Status) ddioctl operation are not supported in kernel mode. Instead, kernel-mode processes specify at open time the addresses of their own procedures for handling receive data available, transmit available and status or exception conditions. The PDH directly calls the appropriate procedure, whenever that condition arises. These kernel procedures must execute and return quickly since they are executing within the priority of the PDH.
- The ddwrite operation for a kernel-mode process differs
from a user-mode process in that there are two ways to issue a ddwrite operation
to transmit data:
- Transmit each buffer of data with the fp_write kernel service.
- Use the fast write operation, which allows the user to directly call the ddwrite operation (no context switching) for each buffer of data to be transmitted. This operation helps increase the performance of transmitted data. A fp_ioctl (CIO_GET_FASTWRT) kernel service call obtains the functional address of the write function. This address is used on all subsequent write function calls. Support of the fast write operation is optional for each device.