---
title: aclrtSnapShotProcessLock
description: "须知：本接口为试验特性，后续版本可能会存在变更，不支持应用于商用产品中。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_2065.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_2065.html
indexId: 06f39491b326c4af940da61b1c4184c4444b28849020dd61bdf9fb7109482d2b68
---
# aclrtSnapShotProcessLock

须知：本接口为试验特性，后续版本可能会存在变更，不支持应用于商用产品中。

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | ☓ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | ☓ |
| Atlas 推理系列产品 | ☓ |
| Atlas 训练系列产品 | ☓ |


#### 功能说明

锁定当前进程，以阻止后续的运行时接口调用，包括Device设置/释放、内存的申请/释放/拷贝、Context/Stream/Event/Notify等资源的创建与销毁、以及部分任务下发接口。

在调用此接口之前，必须确保当前进程处于RUNNING状态，当前进程默认是RUNNING状态；调用该接口后，当前进程将变为LOCKED状态。


#### 函数原型

```
aclError aclrtSnapShotProcessLock()
```


#### 参数说明

无


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
