[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

pmlib_register_application Subroutine

Purpose

Registers or unregister a PM aware application

Library

PM (Power Management) Library (libpm.a)

Syntax

#include <pmlib.h>
int pmlib_register_application(cmd);
int cmd;

Parameters

cmd Determines the action to be taken by the pmlib_register_application subroutine and is one of the following values:
PMLIB_REGISTER
Registers an application.
PMLIB_UNREGISTER
Unregisters an application.

Description

The pmlib_register_application registers or unregisters the caller process as a PM-aware application. The pmlib_register_application subroutine can be called by any user.

Return Values

Upon successful completion, PMLIB_SUCCESS is returned. If the pmlib_request_state subroutine fails, PMLIB_ERROR is returned and errno variable is set to an error code.

Error Codes

ESRCH PM daemon is not running.
EINVAL Invalid argument.

Implementation Specifics

The pmlib_register_application subroutine is part of the Base Operation System (BOS) Runtime.

Related Information

The pmlib_get_event_notice subroutine, pmlib_request_state subroutine, pmlib_request_battery subroutine, pmlib_request_parameter subroutine.


[ Previous | Next | Contents | Glossary | Home | Search ]