The Message Queue kernel services provide the same message queue functions to a kernel extension as the msgctl, msgget, msgsnd, and msgxrcv subroutines make available to a program executing in user mode. Parameters have been added for moving returned information to an explicit parameter to free the return codes for error code usage. Instead of the error information available in the errno global variable (as in user mode), the Message Queue services use the service's return code. The error values are the same, except that a memory fault error (EFAULT) cannot occur because message buffer pointers in the kernel address space are assumed to be valid.
The Message Queue services can be called only from the process environment because they prevent the caller from specifying kernel buffers. These services can be used as an Interprocess Communication mechanism to other kernel processes or user-mode processes. See "Kernel Extension and Device Driver Management Kernel Services" for more information on the functions that these services provide.
There are four Message Queue services available from the kernel:
|kmsgctl||Provides message-queue control operations.|
|kmsgget||Obtains a message-queue identifier.|
|kmsgrcv||Reads a message from a message queue.|
|kmsgsnd||Sends a message using a previously defined message queue.|
The msgctl subroutine, msgget subroutine, msgsnd subroutine, and msgxrcv subroutine.