Rate This Document
Findability
Accuracy
Completeness
Readability

Function Description

Table 1 lists the functions that have been optimized in the kpglibc library.

Table 1 Optimized functions in kpglibc

Function

Description

strcpy

Copies the source character string to the destination, including the null character (\0) at the end.

strcmp

Compares the contents of two character strings and returns a value (positive, negative, or 0) indicating their lexicographical order difference.

memchr

Searches for a character that appears for the first time in a specified memory block and returns a pointer to the character.

memcmp

Compares the contents of two memory blocks and returns the difference.

memcpy

Copies the content of a memory block to another memory block.

memset

Sets all bytes in a memory block to a specified value.

gettimeofday

Obtains the current system time, in seconds and microseconds.

clock_gettime

Obtains the current system time, in seconds and nanoseconds.

kpglibc is available only on the Kunpeng platform. The function interfaces do not verify all input parameters, and the parameter verification logic of the original glibc functions is used. The validity of input parameters needs to be ensured by the service that calls the interfaces.