Determines whether a specified event occurred on a device.
int x25sselect (devno, events, reventp, chan) dev_t devno; ushort events; ushort *reventp; int chan;
|devno||Specifies major and minor device numbers.|
|events|| Identifies the events to check. The events parameter is indicated by a bitwise OR using the following flags:
|reventp||Returns the events pointer. The x25sselect entry point uses this parameter to indicate which of the selected events are true at the time of the call. The reventp parameter is indicated by a bitwise OR of the DPOLLIN, DPOLLOUT, or DPOLLPRI flag, as appropriate.|
|chan||Identifies the channel number assigned by the x25smpx entry point.|
Note: This entry point should only be called by user-mode processes using the select or poll subroutine.
The x25sselect entry point determines if a specified event occurred on a device. If one or more events specified by the events parameter are true, this entry point updates the reventp parameter by setting the corresponding bits.
If none of the events are true, the reventp parameter is set to 0 (zero) and the entry point checks the DPOLLSYNC flag. If this flag is set, the request is synchronous and the entry point simply returns. If this flag is false, the x25sselect entry point records which events were requested. When one or more of the events subsequently becomes true, the x25sselect entry point calls the selnotify kernel subroutine to notify the user process.
When the X.25 device handler is in a state that prevents any of the events from being satisfied (such as an adapter failure), the x25sselect entry point sets the reventp parameter to 1 for the appropriate event. This prevents the select or poll subroutine from waiting indefinitely.
Note: Unless the session protocol is PROTOCOL_YBTS, an X.25 packet sequence can not satisfy a x25sselect entry point until the final packet of the sequence is received or the sequence is otherwise terminated (for example, by the arrival of a clear indication).
An x25sselect entry point can be called from the process environment only.
A return code of -1 indicates an unsuccessful operation. The kernel sets the errno global variable to the following value:
|EINVAL||Indicates an invalid argument was specified or that the x25sselect entry point was called by a kernel-mode user.|
The x25sselect entry point functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.
Select /Poll Logic for ddwrite and ddread Routines.
The CIO_GET_FASTWRT ddioctl Communications PDH entry point.
The selnotify kernel service.
The poll subroutine, select subroutine.