Wakes up processes waiting in a poll or select subroutine or in the fp_poll kernel service.
#include <sys/types.h> #include <sys/errno.h>
void selnotify ( id, subid, rtnevents)
int id;
int subid;
ushort rtnevents;
The selnotify kernel service should be used by device drivers that support select or poll operations. It is also used by the kernel to support select or poll requests to sockets, named pipes, and message queues.
The selnotify kernel service wakes up processes waiting on a select or poll subroutine. The processes to be awakened are those specifying the given device and one or more of the events that have occurred on the specified device. The select and poll subroutines allow a process to request information about one or more events on a particular device. If none of the requested events have yet happened, the process is put to sleep and re-awakened later when the events actually happen.
The selnotify service should be called whenever a previous call to the device driver's ddselect entry point returns and both of the following conditions apply:
The selnotify service can be called for other than these conditions but performs no operation.
The device driver must store information about the events requested while in the driver's ddselect routine under the following conditions:
The POLLSYNC flag, when not set, indicates that asynchronous notification is desired. In this case, the selnotify service should be called when one or more of the requested events later becomes true for that device and channel.
When the device driver finds that it can satisfy a select request, (perhaps due to new input data) and an unsatisfied request for that event is still pending, the selnotify service is called with the following items:
These parameters describe the device instance and requested events that have occurred on that device. The notifying device driver then resets its requested-events flags for the events that have occurred for that device and channel. The reset flags thus indicate that those events are no longer requested.
If the rtnevents parameter indicated by the call to the selnotify service is no longer being waited on, no processes are awakened.
The selnotify kernel service can be called from either the process or interrupt environment.
The selnotify service has no return values.
The selnotify kernel service is part of Base Operating System (BOS) Runtime.
The ddselect device driver entry point.
The fp_poll kernel service, fp_select kernel service, selreg kernel service.
The poll subroutine, select subroutine.
Kernel Extension and Device Driver Management Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.