[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

ddselect Communications PDH Entry Point


Checks to see whether a specified event or events has occurred on the device.


#include <sys/device.h>
#include <sys/comio.h>
int ddselect (devno, events, reventp, chan)
dev_t devno;
ushort events;
ushort *reventp;
int chan;


devno Specifies major and minor device numbers.
events Specifies conditions to check. The conditions are denoted by the bitwise OR of one or more of the following:
POLLIN Check whether receive data is available.
POLLOUT Check whether transmit available.
POLLPRI Check whether status is available.
POLLSYNC Check whether asynchronous notification is available.
reventp Points to the result of condition checks. A bitwise OR of the following conditions is returned:
POLLIN Indicates receive data is available.
POLLOUT Indicates transmit available.
POLLPRI Indicates status is available.
chan Specifies the channel number assigned by the device handler's ddmpx entry point.


Note: This entry point should not be called by a kernel-mode process.

The ddselect communications PDH entry point checks and returns the status of 1 or more conditions for a user-mode process. It works the same way the common ddselect device driver entry point does.

Execution Environment

A ddselect entry point can be called from the process environment only.

Return Values

In general, communication device handlers use the common return codes defined for an entry point. However, device handlers for specific communication devices may return device-specific codes. The common return codes for the ddselect entry point are the following:

ENXIO Indicates an attempt to use an unconfigured device.
EINVAL Indicates a specified argument is not valid.
EACCES Indicates a call from a kernel process is not valid.
EBUSY Indicates the maximum number of opens was exceeded.
ENODEV Indicates the device does not exist.

Related Information

The ddmpx entry point.

[ Previous | Next | Contents | Home | Search ]