aclrtSnapShotProcessRestore
Note: This API is for trial use and may be changed in later versions. It is not available in production environments.
Applicable Products
Product |
Supported |
|---|---|
√ |
|
☓ |
|
√ |
|
√ |
|
X |
|
X |
|
X |
Function
Restores device resources in the snapshot process using the device resource backup from the most recent backup point.
Before calling this API, ensure that the current process is in the BACKED_UP state. After this API is called, the current process will transition to the LOCKED state.
Prototype
1 | aclError aclrtSnapShotProcessRestore(int pid, aclrtSnapShotRestoreArgs *args) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pid |
Input |
Process ID. Only the ID of the current process can be passed. Cross-process operation is not supported. |
args |
Input |
Restoration configuration arguments. For details about the type definition, see aclrtSnapShotRestoreArgs. Currently, only NULL can be passed. |
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
Restoration and backup must be performed on the same device (that is, with the same device ID). If the device is occupied by another process during restoration, the restoration will fail.