---
title: kupl_get_queue_priority_range
description: "获取队列的优先级范围，默认队列优先级最小值为0，队列优先级最大值为3。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_050.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_050.html
indexId: 2fe2f13159860581f91b4fbac4912c010f3ee8a1feef248f8cd4a87412fff90967
---
# kupl_get_queue_priority_range

获取队列的优先级范围，默认队列优先级最小值为0，队列优先级最大值为3。

#### 接口定义

int kupl_get_queue_priority_range(int *least_priority, int *greatest_priority);


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| least\_priority | int \* | 队列优先级的最小值 | 输出 |
| greatest\_priority | int \* | 队列优先级的最大值 | 输出 |


返回值

成功：返回 KUPL_OK

失败：返回 KUPL_ERROR


#### 示例

```
#include <stdio.h> 
#include "kupl.h" 

int main() 
{
    int least_priority;
    int greatest_priority;
    kupl_get_queue_priority_range(&least_priority, &greatest_priority); 
    printf("kupl queue priority range: [%d, %d]\n", least_priority, greatest_priority);
    return 0; 
}
```

上述示例演示了获取队列的优先级范围的流程。kupl_get_queue_priority_range能够获取队列优先级的最小值与最大值。
