我要评分
获取效率
正确性
完整性
易理解

Introduction

The Hyper Thread Library (HTL) and KSL_ASN1 code is integrated in the Kunpeng System Library (KSL) software package. To use HTL or KSL_ASN1, install KSL by following the instructions provided in this document. In addition, this document provides interface definitions and sample code of KSL_ASN1 to help you quickly get started with KSL_ASN1.

KSL is a high-performance system function library provided by Huawei and optimized for the Kunpeng platform. It offers capabilities such as multi-threading, encoding, and decoding on Kunpeng. By utilizing Kunpeng hardware advantages, KSL highlights better performance and usability than open-source implementations. All KSL interfaces are implemented in C, C++, and assembly languages. Table 1 shows the composition of KSL.

Table 1 KSL composition

No.

Library

Description

Application Scenario

1

HTL

The Hyper Thread Library (HTL) is a user-level thread library built on kernel-mode threads. It is used to solve the problem that application performance deteriorates and the system resources are insufficient when a large number of kernel-mode threads are used, especially when the performance is extremely low in nested parallel scenarios. This library improves concurrency and performance while reducing resource usage.

Multi-thread parallel application

2

KSL_ASN1

Abstract Syntax Notation One (ASN.1) defines a formalism for the specification of abstract data types. This notation is used to flexibly describe data representation, encoding, transmission, and decoding. The KSL_ASN1 library is optimized based on open-source ASN.1 software for the Kunpeng platform and has higher performance compared with asn1c. KSL_ASN1 supports the Basic Encoding Rules (BER), Distinguished Encoding Rules (DER), Packed Encoding Rules (PER), and XML Encoding Rules (XER).

ASN.1 file parsing, encoding, and decoding

KSL is available only for Kunpeng processors. To achieve better performance, complete input parameter verification is not performed in KSL interfaces. Use valid input parameters, and invalid input parameters may cause errors.