---
title: acltdtGetBufChainNum
description: 获取共享Buffer链中的共享Buffer数量。同步接口。
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgc/aclcppdevg_03_1649.html"
---

# acltdtGetBufChainNum

获取共享Buffer链中的共享Buffer数量。同步接口。


#### 约束说明

仅支持在Control CPU开放形态或RC模式下使用该接口。


#### 函数原型

aclError acltdtGetBufChainNum(const acltdtBuf headBuf, uint32_t* num)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| headBuf | 输入 | 共享Buffer链头部的第一个共享Buffer的指针，须通过acltdtAllocBuf或acltdtCopyBufRef接口申请获得。 |
| num | 输出 | 共享Buffer链中的共享Buffer数量。 |


#### 返回值说明

返回0表示成功，返回其它值表示失败。
