[ Previous |
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1
Gets a new PM event.
PM (Power Management) Library (libpm.a)
The pmlib_get_event_notice subroutine gets the latest event. It is recommended PM- aware application calls this subroutine when signal notification from pm daemon arrives.
|| Points to an integer that is the latest PM event that the PM daemon holds, event can be bit-wise OR of following values:
- No event.
- Power source is changed to AC.
- Power source is changed to DC.
- System will change state to full-on.
- System will change state to standby.
- System will change state to suspend.
- System will change state to PM enable.
- System will change state to hibernation.
- System will change state to shutdown.
- PM will be unconfigured.
- State change request was rejected.
- State change was completed.
- System is resumed from standby.
- System is resumed from suspend.
- System is resumed from hibernation.
- System state change started.
- System is forced to change state.
- System state change failed.
Upon successful completion, PMLIB_SUCCESS is returned. If the pmlib_get_event_notice subroutine fails, PMLIB_ERROR is returned and errno variable is set to an error code.
|| PM daemon is not running.|
|| Invalid argument.|
Note: If an application program is registered as PM aware, the PM daemon sends a SIGPM (equal to SIGPWR) signal to the application when an PM event occurs. The application program needs to prepare a signal handler and to use this pmlib_get_event_notice subroutine to get the to get the PM event.
The pmlib_get_event_notice subroutine is part of the Base Operation System (BOS) Runtime.
The pmlib_request_state subroutine, pmlib_request_battery subroutine, pmlib_request_parameter subroutine, pmlib_register_application subroutine.
[ Previous |