[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel and Subsystems Technical Reference, Volume 2

KSQUERYSV (Query Keyboard Service Vector)

Purpose

Queries keyboard service vector.

Syntax

#include <sys/inputdd.h>
int ioctl (FileDescriptor, KSQUERYSV, Arg)
int FileDescriptor;
caddr_t *Arg;

Description

The KSQUERYSV ioctl subroutine call returns the address of the keyboard service vector via the calling argument. The keyboard service vector is provided so that certain services may be invoked by kernel extensions without the occurrence of sleeps or page faults. The services provided by the vector must not be invoked by a user process.

The following offsets into the vector are defined:

#define   KSVALARM   0   /* sound alarm                          */
#define   KSVSAK     1   /* disable/enable secure attention key  */
#define   KSVRFLUSH  2   /* flush input ring                     */
#define   KSVALARM   0   /*......*/
#define   KSVSAK     1   /*......*/
#define   KSVRFLUSH  2   /*......*/

Service vector routines are invoked using an indirect call as follows:

(*service_vector[service_number])(dev_t devno, caddr_t arg)

where:

A value of zero is returned if the service vector function is successful. Otherwise, an error number defined in the errno.h file is returned. Alarm requests are ignored if the kernel extension's channel is not active; enable/disable SAK and queue flush requests are always processed.

The KSQUERYSV ioctl subroutine call returns a value of -1 and sets the errno global variable to a value of EINVAL when called by a user process.

Parameters

FileDescriptor Specifies the open file descriptor for the keyboard.
Arg Specifies the address of the location to return the service vector address.

Implementation Specifics

This ioctl subroutine call is part of Base Operating System (BOS) Runtime.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]