[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
reconfig_register, reconfig_unregister, or reconfig_complete
Kernel Service
Purpose
Register and unregister reconfiguration handlers.
Syntax
#include <sys/dr.h>
int reconfig_register (handler, actions, h_arg, h_token, name)
int (*handler)(void *event, void *h_arg, int req, void *resource_info);
int actions;
void *h_arg;
ulong *h_token;
char *name;
int reconfig_unregister (h_token)
ulong h_token;
void reconfig_complete (event, rc)
void *event;
int rc;
Description
The reconfig_register and reconfig_unregister kernel services register and unregister reconfiguration handlers, which
are invoked by the kernel both before and after DLPAR operations depending
on the set of events specified by the kernel extension when registering.
The reconfig_complete kernel service is used to indicate
that the request has completed. If a kernel extension expects that the operation
is likely to take a long time (several seconds), the handler should return DR_WAIT to the caller, but proceed with the request asynchronously.
In this case, the handler indicates that it has completed the request by invoking
the reconfig_complete kernel service.
Parameters
handler |
Specifies the kernel extension function to be invoked. |
actions |
Allows the kernel extension to specify which of the
following events require notification:
- DR_CPU_ADD_CHECK
- DR_CPU_ADD_PRE
- DR_CPU_ADD_POST
- DR_CPU_ADD_POST_ERROR
- DR_CPU_REMOVE_CHECK
- DR_CPU_REMOVE_PRE
- DR_CPU_REMOVE_POST
- DR_CPU_REMOVE_POST_ERROR
- DR_MEM_ADD_CHECK
- DR_MEM_ADD_PRE
- DR_MEM_ADD_POST
- DR_MEM_ADD_POST_ERROR
- DR_MEM_REMOVE_CHECK
- DR_MEM_REMOVE_PRE
- DR_MEM_REMOVE_POST
- DR_MEM_REMOVE_POST_ERROR
|
h_arg |
Specified by the kernel extension, remembered by the
kernel along with the function descriptor for the handler, and passed to the
handler when it is invoked. It is not used directly by the kernel, but is
intended to support kernel extensions that manage multiple adapter instances.
This parameter points to an adapter control block. |
h_token |
An output parameter that is used when unregistering
the handler. |
name |
Provided for information purposes and may be included within an error
log entry, if the driver returns an error. It is provided by the kernel extension
and should be limited to 15 ASCII characters. |
event |
Passed to the handler and intended to be used only when calling the reconfig_complete kernel service. |
req |
Indicates the following DLPAR operation to be performed by the handler:
- DR_CPU_ADD_CHECK
- DR_CPU_ADD_PRE
- DR_CPU_ADD_POST
- DR_CPU_ADD_POST_EEROR
- DR_CPU_REMOVE_CHECK
- DR_CPU_REMOVE_PRE
- DR_CPU_REMOVE_POST
- DR_CPU_REMOVE_POST_ERROR
- DR_MEM_ADD_CHECK
- DR_MEM_ADD_PRE
- DR_MEM_ADD_POST
- DR_MEM_ADD_POST_ERROR
- DR_MEM_REMOVE_CHECK
- DR_MEM_REMOVE_PRE
- DR_MEM_REMOVE_POST
- DR_MEM_REMOVE_POST_ERROR
|
resource_info |
Identifies the resource specific information for the current DLPAR
request. If the request is cpu based, the resource_info data is provided through a dri_cpu structure.
Otherwise a dri_mem structure is used. |
rc |
Can be set to DR_FAIL or DR_SUCCESS. |
Return Values
Upon successful completion, the reconfig_register and reconfig_unregister kernel services return zero. If unsuccessful,
the appropriate errno value is returned.
Execution Environment
The reconfig_register, reconfig_unregister, and handler interfaces are invoked in the process
environment only.
The reconfig_complete kernel service may be invoked
in the process or interrupt environment.
Related Information
Making Kernel Extensions DLPAR-Aware in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]