!16 回退 'Pull Request !14 : 同步NDK'

Merge pull request !16 from openharmony_ci/revert-merge-14-master
This commit is contained in:
openharmony_ci 2023-10-09 07:46:15 +00:00 committed by Gitee
commit 8a2944c884
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
31 changed files with 711 additions and 236 deletions

View File

@ -31,7 +31,6 @@
* to construct and compile models and perform inference and computing on acceleration hardware.
* Note: Currently, the APIs of Neural Network Runtime do not support multi-thread calling. \n
*
* @library libneural_network_runtime.so
* @since 9
* @version 1.0
*/

View File

@ -28,8 +28,7 @@
* @file neural_network_runtime_type.h
*
* @brief Defines the structure and enumeration for Neural Network Runtime.
*
* @library libneural_network_runtime.so
*
* @since 9
* @version 1.0
*/

View File

@ -47,7 +47,6 @@ extern "C" {
/**
* @brief Initializes the DDK.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @return <b>0</b> if the operation is successful; a negative value otherwise.
* @since 10
* @version 1.0
@ -57,7 +56,6 @@ int32_t OH_Usb_Init(void);
/**
* @brief Releases the DDK.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @since 10
* @version 1.0
*/
@ -66,7 +64,6 @@ void OH_Usb_Release(void);
/**
* @brief Obtains the USB device descriptor.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param deviceId ID of the device whose descriptor is to be obtained.
* @param desc Standard device descriptor defined in the USB protocol.
* @return <b>0</b> if the operation is successful; a negative value otherwise.
@ -79,7 +76,6 @@ int32_t OH_Usb_GetDeviceDescriptor(uint64_t deviceId, struct UsbDeviceDescriptor
* @brief Obtains the configuration descriptor. To avoid memory leakage, use <b>OH_Usb_FreeConfigDescriptor</b>\n
* to release a descriptor after use.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param deviceId ID of the device whose configuration descriptor is to be obtained.
* @param configIndex Configuration index, which corresponds to <b>bConfigurationValue</b> in the USB protocol.
* @param config Configuration descriptor, which includes the standard configuration descriptor defined in the\n
@ -95,7 +91,6 @@ int32_t OH_Usb_GetConfigDescriptor(
* @brief Releases the configuration descriptor. To avoid memory leakage, use <b>OH_Usb_FreeConfigDescriptor</b>\n
* to release a descriptor after use.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param config Configuration descriptor obtained by calling <b>OH_Usb_GetConfigDescriptor</b>.
* @since 10
* @version 1.0
@ -105,7 +100,6 @@ void OH_Usb_FreeConfigDescriptor(struct UsbDdkConfigDescriptor * const config);
/**
* @brief Claims a USB interface.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param deviceId ID of the device to be operated.
* @param interfaceIndex Interface index, which corresponds to <b>bInterfaceNumber</b> in the USB protocol.
* @param interfaceHandle Interface operation handle. After the interface is claimed successfully, a value will be\n
@ -119,7 +113,6 @@ int32_t OH_Usb_ClaimInterface(uint64_t deviceId, uint8_t interfaceIndex, uint64_
/**
* @brief Releases a USB interface.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param interfaceHandle Interface operation handle.
* @return <b>0</b> if the operation is successful; a negative value otherwise.
* @since 10
@ -130,7 +123,6 @@ int32_t OH_Usb_ReleaseInterface(uint64_t interfaceHandle);
/**
* @brief Activates the alternate setting of the USB interface.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param interfaceHandle Interface operation handle.
* @param settingIndex Index of the alternate setting, which corresponds to <b>bAlternateSetting</b>\n
* in the USB protocol.
@ -143,7 +135,6 @@ int32_t OH_Usb_SelectInterfaceSetting(uint64_t interfaceHandle, uint8_t settingI
/**
* @brief Obtains the activated alternate setting of the USB interface.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param interfaceHandle Interface operation handle.
* @param settingIndex Index of the alternate setting, which corresponds to <b>bAlternateSetting</b>\n
* in the USB protocol.
@ -156,7 +147,6 @@ int32_t OH_Usb_GetCurrentInterfaceSetting(uint64_t interfaceHandle, uint8_t *set
/**
* @brief Sends a control read transfer request. This API works in a synchronous manner.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param interfaceHandle Interface operation handle.
* @param setup Request data, which corresponds to <b>Setup Data</b> in the USB protocol.
* @param timeout Timeout duration, in milliseconds.
@ -172,7 +162,6 @@ int32_t OH_Usb_SendControlReadRequest(uint64_t interfaceHandle, const struct Usb
/**
* @brief Sends a control write transfer request. This API works in a synchronous manner.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param interfaceHandle Interface operation handle.
* @param setup Request data, which corresponds to <b>Setup Data</b> in the USB protocol.
* @param timeout Timeout duration, in milliseconds.
@ -189,7 +178,6 @@ int32_t OH_Usb_SendControlWriteRequest(uint64_t interfaceHandle, const struct Us
* @brief Sends a pipe request. This API works in a synchronous manner. This API applies to interrupt transfer\n
* and bulk transfer.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param pipe Pipe used to transfer data.
* @param devMmap Device memory map, which can be obtained by calling <b>OH_Usb_CreateDeviceMemMap</b>.
* @return <b>0</b> if the operation is successful; a negative value otherwise.
@ -202,7 +190,6 @@ int32_t OH_Usb_SendPipeRequest(const struct UsbRequestPipe *pipe, UsbDeviceMemMa
* @brief Creates a buffer. To avoid resource leakage, destroy a buffer by calling\n
* <b>OH_Usb_DestroyDeviceMemMap</b> after use.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param deviceId ID of the device for which the buffer is to be created.
* @param size Buffer size.
* @param devMmap Data memory map, through which the created buffer is returned to the caller.
@ -215,7 +202,6 @@ int32_t OH_Usb_CreateDeviceMemMap(uint64_t deviceId, size_t size, UsbDeviceMemMa
/**
* @brief Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use.
*
* @permission ohos.permission.ACCESS_DDK_USB
* @param devMmap Device memory map created by calling <b>OH_Usb_CreateDeviceMemMap</b>.
* @since 10
* @version 1.0

View File

@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native buffer.
*
* @library libnative_buffer.so
* @since 9
* @version 1.0
*/
@ -46,48 +45,6 @@ extern "C" {
struct OH_NativeBuffer;
typedef struct OH_NativeBuffer OH_NativeBuffer;
/**
* @brief Indicates the usage of a native buffer.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @since 10
* @version 1.0
*/
enum OH_NativeBuffer_Usage {
NATIVEBUFFER_USAGE_CPU_READ = (1ULL << 0), /// < CPU read buffer */
NATIVEBUFFER_USAGE_CPU_WRITE = (1ULL << 1), /// < CPU write memory */
NATIVEBUFFER_USAGE_MEM_DMA = (1ULL << 3), /// < Direct memory access (DMA) buffer */
};
/**
* @brief Indicates the format of a native buffer.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @since 10
* @version 1.0
*/
enum OH_NativeBuffer_Format {
NATIVEBUFFER_PIXEL_FMT_RGB_565 = 3, /// < RGB565 format */
NATIVEBUFFER_PIXEL_FMT_RGBA_5658, /// < RGBA5658 format */
NATIVEBUFFER_PIXEL_FMT_RGBX_4444, /// < RGBX4444 format */
NATIVEBUFFER_PIXEL_FMT_RGBA_4444, /// < RGBA4444 format */
NATIVEBUFFER_PIXEL_FMT_RGB_444, /// < RGB444 format */
NATIVEBUFFER_PIXEL_FMT_RGBX_5551, /// < RGBX5551 format */
NATIVEBUFFER_PIXEL_FMT_RGBA_5551, /// < RGBA5551 format */
NATIVEBUFFER_PIXEL_FMT_RGB_555, /// < RGB555 format */
NATIVEBUFFER_PIXEL_FMT_RGBX_8888, /// < RGBX8888 format */
NATIVEBUFFER_PIXEL_FMT_RGBA_8888, /// < RGBA8888 format */
NATIVEBUFFER_PIXEL_FMT_RGB_888, /// < RGB888 format */
NATIVEBUFFER_PIXEL_FMT_BGR_565, /// < BGR565 format */
NATIVEBUFFER_PIXEL_FMT_BGRX_4444, /// < BGRX4444 format */
NATIVEBUFFER_PIXEL_FMT_BGRA_4444, /// < BGRA4444 format */
NATIVEBUFFER_PIXEL_FMT_BGRX_5551, /// < BGRX5551 format */
NATIVEBUFFER_PIXEL_FMT_BGRA_5551, /// < BGRA5551 format */
NATIVEBUFFER_PIXEL_FMT_BGRX_8888, /// < BGRX8888 format */
NATIVEBUFFER_PIXEL_FMT_BGRA_8888, /// < BGRA8888 format */
NATIVEBUFFER_PIXEL_FMT_BUTT = 0X7FFFFFFF /// < Invalid pixel format */
};
/**
* @brief <b>OH_NativeBuffer</b> config. \n
* Used to allocating new <b>OH_NativeBuffer</b> andquery parameters if existing ones.
@ -101,7 +58,6 @@ typedef struct {
int32_t height; ///< Height in pixels
int32_t format; ///< One of PixelFormat
int32_t usage; ///< Combination of buffer usage
int32_t stride; ///< the stride of memory
} OH_NativeBuffer_Config;
/**

View File

@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native image.
*
* @library libnative_image.so
* @since 9
* @version 1.0
*/

View File

@ -1,6 +1,5 @@
[
{ "name": "OH_NativeVSync_Create" },
{ "name": "OH_NativeVSync_Destroy" },
{ "name": "OH_NativeVSync_RequestFrame" },
{ "name": "OH_NativeVSync_GetPeriod" }
{ "name": "OH_NativeVSync_RequestFrame" }
]

View File

@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native vsync.
*
* @library libnative_vsync.so
* @since 9
* @version 1.0
*/
@ -81,18 +80,6 @@ void OH_NativeVSync_Destroy(OH_NativeVSync* nativeVsync);
* @version 1.0
*/
int OH_NativeVSync_RequestFrame(OH_NativeVSync* nativeVsync, OH_NativeVSync_FrameCallback callback, void* data);
/**
* @brief Get vsync period.
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeVsync
* @param nativeVsync Indicates the pointer to a NativeVsync.
* @param period Indicates the vsync period.
* @return Returns int32_t, return value == 0, success, otherwise, failed.
* @since 10
* @version 1.0
*/
int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period);
#ifdef __cplusplus
}
#endif

View File

@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native window.
*
* @library libnative_window.so
* @since 8
* @version 1.0
*/

View File

@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FFRT_API_FFRT_H
#define FFRT_API_FFRT_H
#ifdef __cplusplus
#include "cpp/task.h"
#include "cpp/mutex.h"
#include "cpp/condition_variable.h"
#include "cpp/sleep.h"
#include "cpp/queue.h"
#else
#include "c/task.h"
#include "c/mutex.h"
#include "c/condition_variable.h"
#include "c/sleep.h"
#include "c/queue.h"
#endif
#endif

View File

@ -21,7 +21,7 @@
* @{
*
* @brief Defines the capabilities of OpenHarmony Universal KeyStore (HUKS) parameter sets.
* The HUKS APIs can be used to perform parameter set lifecycle management,
* The HUKS APIs can be used to perform parameter set lifecycle management,
* including initializing a parameter set, adding parameters to a parameter set, constructing
* a parameter set, and destroying a parameter set.
* They can also be used to obtain parameters, copy parameter sets, and check parameter validity.

View File

@ -447,7 +447,7 @@ enum OH_Huks_AuthAccessType {
/** The key is invalid after the password is cleared. */
OH_HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0,
/** The key is invalid after a new biometric feature is enrolled. */
OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1
OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1,
};
/**

View File

@ -46,7 +46,7 @@ const char *OH_GetManufacture(void);
const char *OH_GetBrand(void);
/**
* Obtains the product name speaded in the market
* Obtains the external product series represented by a string.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
@ -95,14 +95,14 @@ const char *OH_GetBootloaderVersion(void);
const char *OH_GetAbiList(void);
/**
* Obtains the security patch tag represented by a string.
* Obtains the security patch level represented by a string.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const char *OH_GetSecurityPatchTag(void);
/**
* Obtains the product version displayed for customer represented by a string.
* Obtains the product version represented by a string.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
@ -126,7 +126,7 @@ const char *OH_GetIncrementalVersion(void);
const char *OH_GetOsReleaseType(void);
/**
* Obtains the OS full version name represented by a string.
* Obtains the OS version represented by a string.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
@ -154,35 +154,35 @@ int OH_GetFirstApiVersion(void);
const char *OH_GetVersionId(void);
/**
* Obtains the build type of the current running OS.
* Obtains the build types of the same baseline code.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const char *OH_GetBuildType(void);
/**
* Obtains the build user of the current running OS.
* Obtains the different build user of the same baseline code.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const char *OH_GetBuildUser(void);
/**
* Obtains the build host of the current running OS.
* Obtains the different build host of the same baseline code.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const char *OH_GetBuildHost(void);
/**
* Obtains the build time of the current running OS.
* Obtains the build time.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const char *OH_GetBuildTime(void);
/**
* Obtains the version hash of the current running OS.
* Obtains the version hash.
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/

View File

@ -18,7 +18,329 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import("//build/ohos.gni")
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/ndk/ndk.gni")
import("//third_party/libuv/libuv.gni")
# This is the configuration needed to use libuv.
config("libuv_config") {
include_dirs = [
"include",
"src",
"src/unix",
]
cflags = [
"-Wno-unused-parameter",
"-Wno-incompatible-pointer-types",
"-D_GNU_SOURCE",
"-D_POSIX_C_SOURCE=200112",
]
# Adding NDEBUG macro manually to avoid compilation
# error in debug version, FIX ME
# https://gitee.com/openharmony/build/pulls/1206/files
defines += [ "NDEBUG" ]
}
# This is the configuration used to build libuv itself.
# It should not be needed outside of this library.
config("libuv_private_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"src",
"src/unix",
]
# Adding NDEBUG macro manually to avoid compilation
# error in debug version, FIX ME
# https://gitee.com/openharmony/build/pulls/1206/files
defines += [ "NDEBUG" ]
}
source_set("libuv_source") {
include_dirs = [
"include",
"src",
"src/unix",
]
cflags = [
"-Wno-unused-parameter",
"-Wno-incompatible-pointer-types",
"-D_GNU_SOURCE",
"-D_POSIX_C_SOURCE=200112",
"-U__linux__",
"-D__GNU__",
"-fPIC",
]
sources = [
# common_source
"src/fs-poll.c",
"src/idna.c",
"src/inet.c",
"src/random.c",
"src/strscpy.c",
"src/threadpool.c",
"src/timer.c",
"src/uv-common.c",
"src/uv-data-getter-setters.c",
"src/version.c",
# nonwin_srcs
"src/unix/async.c",
"src/unix/core.c",
"src/unix/dl.c",
"src/unix/epoll.c",
"src/unix/fs.c",
"src/unix/getaddrinfo.c",
"src/unix/getnameinfo.c",
"src/unix/loop-watcher.c",
"src/unix/loop.c",
"src/unix/no-fsevents.c",
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/posix-hrtime.c",
"src/unix/posix-poll.c",
"src/unix/process.c",
"src/unix/random-devurandom.c",
"src/unix/signal.c",
"src/unix/stream.c",
"src/unix/tcp.c",
"src/unix/thread.c",
"src/unix/tty.c",
"src/unix/udp.c",
]
}
static_library("uv_static") {
deps = [ ":libuv_source" ]
public_configs = [ ":libuv_config" ]
}
shared_library("uv") {
deps = [ ":libuv_source" ]
public_configs = [ ":libuv_config" ]
libs = [
"pthread",
"dl",
]
}
} else {
import("//build/ohos.gni")
import("//third_party/libuv/libuv.gni")
common_source = [
"src/fs-poll.c",
"src/idna.c",
"src/inet.c",
"src/random.c",
"src/strscpy.c",
"src/threadpool.c",
"src/timer.c",
"src/uv-common.c",
"src/uv-data-getter-setters.c",
"src/version.c",
]
if (!is_mingw && !is_win) {
nonwin_srcs = [
"src/unix/epoll.c",
"src/unix/async.c",
"src/unix/core.c",
"src/unix/dl.c",
"src/unix/fs.c",
"src/unix/getaddrinfo.c",
"src/unix/getnameinfo.c",
"src/unix/loop.c",
"src/unix/loop-watcher.c",
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/process.c",
"src/unix/random-devurandom.c",
"src/unix/signal.c",
"src/unix/stream.c",
"src/unix/tcp.c",
"src/unix/thread.c",
"src/unix/tty.c",
"src/unix/udp.c",
]
}
# This is the configuration needed to use libuv.
config("libuv_config") {
include_dirs = [
"include",
"src",
"src/unix",
]
cflags = [ "-Wno-unused-parameter" ]
if (is_linux || is_ohos) {
cflags += [
"-Wno-incompatible-pointer-types",
"-D_GNU_SOURCE",
"-D_POSIX_C_SOURCE=200112",
]
# Adding NDEBUG macro manually to avoid compilation
# error in debug version, FIX ME
# https://gitee.com/openharmony/build/pulls/1206/files
defines = [ "NDEBUG" ]
if (use_ffrt && is_ohos) {
defines += [ "USE_FFRT" ]
}
} else if (is_mingw || is_win) {
cflags += [
"-Wno-missing-braces",
"-Wno-implicit-function-declaration",
"-Wno-error=return-type",
"-Wno-error=sign-compare",
"-Wno-error=unused-variable",
"-Wno-error=unknown-pragmas",
"-Wno-unused-variable",
]
defines = [
"WIN32_LEAN_AND_MEAN",
"_WIN32_WINNT=0x0600",
]
# Adding NDEBUG macro manually to avoid compilation
# error in debug version, FIX ME
# https://gitee.com/openharmony/build/pulls/1206/files
defines += [ "NDEBUG" ]
libs = [
"psapi",
"user32",
"advapi32",
"iphlpapi",
"userenv",
"ws2_32",
]
}
}
# This is the configuration used to build libuv itself.
# It should not be needed outside of this library.
config("libuv_private_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"src",
"src/unix",
]
# Adding NDEBUG macro manually to avoid compilation
# error in debug version, FIX ME
# https://gitee.com/openharmony/build/pulls/1206/files
defines = [ "NDEBUG" ]
}
ohos_source_set("libuv_source") {
configs = [ ":libuv_config" ]
sources = common_source
if (is_mac || (defined(is_ios) && is_ios)) {
sources += nonwin_srcs + [
"src/unix/bsd-ifaddrs.c",
"src/unix/kqueue.c",
"src/unix/random-getentropy.c",
"src/unix/darwin-proctitle.c",
"src/unix/darwin.c",
"src/unix/fsevents.c",
"src/unix/os390-proctitle.c",
]
sources -= [ "src/unix/epoll.c" ]
} else if (is_mingw || is_win) {
sources += [
"src/win/async.c",
"src/win/core.c",
"src/win/detect-wakeup.c",
"src/win/dl.c",
"src/win/error.c",
"src/win/fs-event.c",
"src/win/fs.c",
"src/win/getaddrinfo.c",
"src/win/getnameinfo.c",
"src/win/handle.c",
"src/win/loop-watcher.c",
"src/win/pipe.c",
"src/win/poll.c",
"src/win/process-stdio.c",
"src/win/process.c",
"src/win/signal.c",
"src/win/snprintf.c",
"src/win/stream.c",
"src/win/tcp.c",
"src/win/thread.c",
"src/win/tty.c",
"src/win/udp.c",
"src/win/util.c",
"src/win/winapi.c",
"src/win/winsock.c",
]
} else if (is_ohos || (defined(is_android) && is_android)) {
sources += nonwin_srcs + [
"src/unix/linux-core.c",
"src/unix/linux-inotify.c",
"src/unix/linux-syscalls.c",
"src/unix/procfs-exepath.c",
"src/unix/pthread-fixes.c",
"src/unix/random-getentropy.c",
"src/unix/random-getrandom.c",
"src/unix/random-sysctl-linux.c",
"src/unix/proctitle.c",
]
if (use_ffrt) {
external_deps = [ "ffrt:libffrt" ]
}
} else if (is_linux) {
sources += nonwin_srcs + [
"src/unix/linux-core.c",
"src/unix/linux-inotify.c",
"src/unix/linux-syscalls.c",
"src/unix/procfs-exepath.c",
"src/unix/random-getrandom.c",
"src/unix/random-sysctl-linux.c",
"src/unix/proctitle.c",
]
} else {
sources += nonwin_srcs + [
"src/unix/linux-core.c",
"src/unix/linux-inotify.c",
"src/unix/linux-syscalls.c",
"src/unix/procfs-exepath.c",
"src/unix/random-getrandom.c",
"src/unix/random-sysctl-linux.c",
"src/unix/proctitle.c",
]
}
subsystem_name = "thirdparty"
part_name = "libuv"
}
ohos_static_library("uv_static") {
deps = [ ":libuv_source" ]
public_configs = [ ":libuv_config" ]
subsystem_name = "thirdparty"
part_name = "libuv"
}
ohos_shared_library("uv") {
deps = [ ":libuv_source" ]
public_configs = [ ":libuv_config" ]
subsystem_name = "thirdparty"
innerapi_tags = [ "platformsdk" ]
part_name = "libuv"
if (is_ohos) {
output_extension = "so"
}
install_images = [
"system",
"updater",
]
}
}
ohos_ndk_library("libuv_ndk") {
ndk_description_file = "./libuv.ndk.json"

284
third_party/libuv/libuv.ndk.json vendored Normal file
View File

@ -0,0 +1,284 @@
[
{"name":"uv_version"},
{"name":"uv_version_string"},
{"name":"uv_replace_allocator"},
{"name":"uv_default_loop"},
{"name":"uv_loop_init"},
{"name":"uv_loop_close"},
{"name":"uv_loop_new"},
{"name":"uv_loop_delete"},
{"name":"uv_loop_size"},
{"name":"uv_loop_alive"},
{"name":"uv_loop_configure"},
{"name":"uv_loop_fork"},
{"name":"uv_run"},
{"name":"uv_stop"},
{"name":"uv_ref"},
{"name":"uv_unref"},
{"name":"uv_has_ref"},
{"name":"uv_update_time"},
{"name":"uv_now"},
{"name":"uv_backend_fd"},
{"name":"uv_backend_timeout"},
{"name":"uv_translate_sys_error"},
{"name":"uv_strerror"},
{"name":"uv_strerror_r"},
{"name":"uv_err_name"},
{"name":"uv_err_name_r"},
{"name":"uv_shutdown"},
{"name":"uv_handle_size"},
{"name":"uv_handle_get_type"},
{"name":"uv_handle_type_name"},
{"name":"uv_handle_get_data"},
{"name":"uv_handle_get_loop"},
{"name":"uv_handle_set_data"},
{"name":"uv_req_size"},
{"name":"uv_req_get_data"},
{"name":"uv_req_set_data"},
{"name":"uv_req_get_type"},
{"name":"uv_req_type_name"},
{"name":"uv_is_active"},
{"name":"uv_walk"},
{"name":"uv_print_all_handles"},
{"name":"uv_print_active_handles"},
{"name":"uv_close"},
{"name":"uv_send_buffer_size"},
{"name":"uv_recv_buffer_size"},
{"name":"uv_fileno"},
{"name":"uv_buf_init"},
{"name":"uv_stream_get_write_queue_size"},
{"name":"uv_listen"},
{"name":"uv_accept"},
{"name":"uv_read_start"},
{"name":"uv_read_stop"},
{"name":"uv_write"},
{"name":"uv_write2"},
{"name":"uv_try_write"},
{"name":"uv_is_readable"},
{"name":"uv_is_writable"},
{"name":"uv_stream_set_blocking"},
{"name":"uv_is_closing"},
{"name":"uv_tcp_init"},
{"name":"uv_tcp_init_ex"},
{"name":"uv_tcp_open"},
{"name":"uv_tcp_nodelay"},
{"name":"uv_tcp_keepalive"},
{"name":"uv_tcp_simultaneous_accepts"},
{"name":"uv_tcp_bind"},
{"name":"uv_tcp_getsockname"},
{"name":"uv_tcp_getpeername"},
{"name":"uv_tcp_close_reset"},
{"name":"uv_tcp_connect"},
{"name":"uv_udp_init"},
{"name":"uv_udp_init_ex"},
{"name":"uv_udp_open"},
{"name":"uv_udp_bind"},
{"name":"uv_udp_connect"},
{"name":"uv_udp_getpeername"},
{"name":"uv_udp_getsockname"},
{"name":"uv_udp_set_membership"},
{"name":"uv_udp_set_source_membership"},
{"name":"uv_udp_set_multicast_loop"},
{"name":"uv_udp_set_multicast_ttl"},
{"name":"uv_udp_set_multicast_interface"},
{"name":"uv_udp_set_broadcast"},
{"name":"uv_udp_set_ttl"},
{"name":"uv_udp_send"},
{"name":"uv_udp_try_send"},
{"name":"uv_udp_recv_start"},
{"name":"uv_udp_recv_stop"},
{"name":"uv_udp_get_send_queue_size"},
{"name":"uv_udp_get_send_queue_count"},
{"name":"uv_tty_init"},
{"name":"uv_tty_set_mode"},
{"name":"uv_tty_reset_mode"},
{"name":"uv_tty_get_winsize"},
{"name":"uv_tty_set_vterm_state"},
{"name":"uv_tty_get_vterm_state"},
{"name":"uv_guess_handle"},
{"name":"uv_pipe_init"},
{"name":"uv_pipe_open"},
{"name":"uv_pipe_bind"},
{"name":"uv_pipe_connect"},
{"name":"uv_pipe_getsockname"},
{"name":"uv_pipe_getpeername"},
{"name":"uv_pipe_pending_instances"},
{"name":"uv_pipe_pending_count"},
{"name":"uv_pipe_pending_type"},
{"name":"uv_pipe_chmod"},
{"name":"uv_poll_init"},
{"name":"uv_poll_init_socket"},
{"name":"uv_poll_start"},
{"name":"uv_poll_stop"},
{"name":"uv_prepare_init"},
{"name":"uv_prepare_start"},
{"name":"uv_prepare_stop"},
{"name":"uv_check_init"},
{"name":"uv_check_start"},
{"name":"uv_check_stop"},
{"name":"uv_idle_init"},
{"name":"uv_idle_start"},
{"name":"uv_idle_stop"},
{"name":"uv_async_init"},
{"name":"uv_async_send"},
{"name":"uv_timer_init"},
{"name":"uv_timer_start"},
{"name":"uv_timer_stop"},
{"name":"uv_timer_again"},
{"name":"uv_timer_set_repeat"},
{"name":"uv_timer_get_repeat"},
{"name":"uv_getaddrinfo"},
{"name":"uv_freeaddrinfo"},
{"name":"uv_getnameinfo"},
{"name":"uv_spawn"},
{"name":"uv_process_kill"},
{"name":"uv_kill"},
{"name":"uv_process_get_pid"},
{"name":"uv_queue_work"},
{"name":"uv_cancel"},
{"name":"uv_setup_args"},
{"name":"uv_get_process_title"},
{"name":"uv_set_process_title"},
{"name":"uv_resident_set_memory"},
{"name":"uv_uptime"},
{"name":"uv_get_osfhandle"},
{"name":"uv_open_osfhandle"},
{"name":"uv_getrusage"},
{"name":"uv_os_homedir"},
{"name":"uv_os_tmpdir"},
{"name":"uv_os_get_passwd"},
{"name":"uv_os_free_passwd"},
{"name":"uv_os_getpid"},
{"name":"uv_os_getppid"},
{"name":"uv_os_getpriority"},
{"name":"uv_os_setpriority"},
{"name":"uv_cpu_info"},
{"name":"uv_free_cpu_info"},
{"name":"uv_interface_addresses"},
{"name":"uv_free_interface_addresses"},
{"name":"uv_os_environ"},
{"name":"uv_os_free_environ"},
{"name":"uv_os_getenv"},
{"name":"uv_os_setenv"},
{"name":"uv_os_unsetenv"},
{"name":"uv_os_gethostname"},
{"name":"uv_os_uname"},
{"name":"uv_fs_get_type"},
{"name":"uv_fs_get_result"},
{"name":"uv_fs_get_ptr"},
{"name":"uv_fs_get_path"},
{"name":"uv_fs_get_statbuf"},
{"name":"uv_fs_req_cleanup"},
{"name":"uv_fs_close"},
{"name":"uv_fs_open"},
{"name":"uv_fs_read"},
{"name":"uv_fs_unlink"},
{"name":"uv_fs_write"},
{"name":"uv_fs_copyfile"},
{"name":"uv_fs_mkdir"},
{"name":"uv_fs_mkdtemp"},
{"name":"uv_fs_mkstemp"},
{"name":"uv_fs_rmdir"},
{"name":"uv_fs_scandir"},
{"name":"uv_fs_scandir_next"},
{"name":"uv_fs_opendir"},
{"name":"uv_fs_readdir"},
{"name":"uv_fs_closedir"},
{"name":"uv_fs_stat"},
{"name":"uv_fs_fstat"},
{"name":"uv_fs_rename"},
{"name":"uv_fs_fsync"},
{"name":"uv_fs_fdatasync"},
{"name":"uv_fs_ftruncate"},
{"name":"uv_fs_sendfile"},
{"name":"uv_fs_access"},
{"name":"uv_fs_chmod"},
{"name":"uv_fs_utime"},
{"name":"uv_fs_futime"},
{"name":"uv_fs_lstat"},
{"name":"uv_fs_link"},
{"name":"uv_fs_symlink"},
{"name":"uv_fs_readlink"},
{"name":"uv_fs_realpath"},
{"name":"uv_fs_fchmod"},
{"name":"uv_fs_chown"},
{"name":"uv_fs_fchown"},
{"name":"uv_fs_lchown"},
{"name":"uv_fs_statfs"},
{"name":"uv_fs_poll_init"},
{"name":"uv_fs_poll_start"},
{"name":"uv_fs_poll_stop"},
{"name":"uv_fs_poll_getpath"},
{"name":"uv_signal_init"},
{"name":"uv_signal_start"},
{"name":"uv_signal_start_oneshot"},
{"name":"uv_signal_stop"},
{"name":"uv_loadavg"},
{"name":"uv_fs_event_init"},
{"name":"uv_fs_event_start"},
{"name":"uv_fs_event_stop"},
{"name":"uv_fs_event_getpath"},
{"name":"uv_ip4_addr"},
{"name":"uv_ip6_addr"},
{"name":"uv_ip4_name"},
{"name":"uv_ip6_name"},
{"name":"uv_inet_ntop"},
{"name":"uv_inet_pton"},
{"name":"uv_random"},
{"name":"uv_if_indextoname"},
{"name":"uv_if_indextoiid"},
{"name":"uv_exepath"},
{"name":"uv_cwd"},
{"name":"uv_chdir"},
{"name":"uv_get_free_memory"},
{"name":"uv_get_total_memory"},
{"name":"uv_get_constrained_memory"},
{"name":"uv_hrtime"},
{"name":"uv_sleep"},
{"name":"uv_disable_stdio_inheritance"},
{"name":"uv_dlopen"},
{"name":"uv_dlclose"},
{"name":"uv_dlsym"},
{"name":"uv_dlerror"},
{"name":"uv_mutex_init"},
{"name":"uv_mutex_init_recursive"},
{"name":"uv_mutex_destroy"},
{"name":"uv_mutex_lock"},
{"name":"uv_mutex_trylock"},
{"name":"uv_mutex_unlock"},
{"name":"uv_rwlock_init"},
{"name":"uv_rwlock_destroy"},
{"name":"uv_rwlock_rdlock"},
{"name":"uv_rwlock_tryrdlock"},
{"name":"uv_rwlock_rdunlock"},
{"name":"uv_rwlock_wrlock"},
{"name":"uv_rwlock_trywrlock"},
{"name":"uv_rwlock_wrunlock"},
{"name":"uv_sem_init"},
{"name":"uv_sem_destroy"},
{"name":"uv_sem_post"},
{"name":"uv_sem_wait"},
{"name":"uv_sem_trywait"},
{"name":"uv_cond_init"},
{"name":"uv_cond_destroy"},
{"name":"uv_cond_signal"},
{"name":"uv_cond_broadcast"},
{"name":"uv_barrier_init"},
{"name":"uv_barrier_destroy"},
{"name":"uv_barrier_wait"},
{"name":"uv_cond_wait"},
{"name":"uv_cond_timedwait"},
{"name":"uv_once"},
{"name":"uv_key_create"},
{"name":"uv_key_delete"},
{"name":"uv_key_get"},
{"name":"uv_key_set"},
{"name":"uv_gettimeofday"},
{"name":"uv_thread_create"},
{"name":"uv_thread_create_ex"},
{"name":"uv_thread_self"},
{"name":"uv_thread_join"},
{"name":"uv_thread_equal"},
{"name":"uv_loop_get_data"},
{"name":"uv_loop_set_data"}
]

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file context.h
*
* @brief Context相关的接口
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
#define MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
@ -131,7 +112,7 @@ OH_AI_API void OH_AI_ContextSetEnableParallel(OH_AI_ContextHandle context, bool
* @return Bool value that indicates whether in parallel.
* @since 9
*/
OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context);
OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context);
/**
* @brief Add device info to context object.

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file data_type.h
*
* @brief
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
#define MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file format.h
*
* @brief
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_FORMAT_C_H
#define MINDSPORE_INCLUDE_C_API_FORMAT_C_H

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file model.h
*
* @brief
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_MODEL_C_H
#define MINDSPORE_INCLUDE_C_API_MODEL_C_H

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file status.h
*
* @brief Mindspore Lite运行时的状态码
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_STATUS_C_H
#define MINDSPORE_INCLUDE_C_API_STATUS_C_H

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file tensor.h
*
* @brief
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_TENSOE_C_H
#define MINDSPORE_INCLUDE_C_API_TENSOE_C_H

View File

@ -13,25 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup MindSpore
* @{
*
* @brief MindSpore Lite的模型推理相关接口
*
* @Syscap SystemCapability.Ai.MindSpore
* @since 9
*/
/**
* @file types.h
*
* @brief MindSpore Lite支持的模型文件类型和设备类型
*
* @library libmindspore_lite_ndk.so
* @since 9
*/
#ifndef MINDSPORE_INCLUDE_C_API_TYPES_C_H
#define MINDSPORE_INCLUDE_C_API_TYPES_C_H

View File

@ -44,6 +44,10 @@ struct aiocb {
#define off64_t off_t
#endif
#if _REDIR_TIME64
__REDIR(aio_suspend, __aio_suspend_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -1,3 +1,18 @@
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _LANGINFO_H
#define _LANGINFO_H

View File

@ -9,22 +9,16 @@ extern "C" {
#include <bits/alltypes.h>
#define M_SET_THREAD_CACHE (-1001)
#define M_SET_THREAD_CACHE -1001
#define M_THREAD_CACHE_ENABLE 1
#define M_THREAD_CACHE_DISABLE 0
#define M_FLUSH_THREAD_CACHE (-1002)
#define M_FLUSH_THREAD_CACHE -1002
#define M_DELAYED_FREE (-1003)
#define M_DELAYED_FREE -1003
#define M_DELAYED_FREE_ENABLE 1
#define M_DELAYED_FREE_DISABLE 0
#define M_OHOS_CONFIG (-1004)
#define M_DISABLE_OPT_TCACHE 100
#define M_ENABLE_OPT_TCACHE 101
#define M_TCACHE_PERFORMANCE_MODE 102
#define M_TCACHE_NORMAL_MODE 103
void *malloc (size_t);
void *calloc (size_t, size_t);
void *realloc (void *, size_t);

View File

@ -19,6 +19,11 @@ struct mq_attr {
};
struct sigevent;
#if _REDIR_TIME64
__REDIR(mq_timedreceive, __mq_timedreceive_time64);
__REDIR(mq_timedsend, __mq_timedsend_time64);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _PTHREAD_H
#define _PTHREAD_H
#ifdef __cplusplus

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _SYS_REBOOT_H
#define _SYS_REBOOT_H
#ifdef __cplusplus

View File

@ -37,4 +37,4 @@ mv ${OUT_DIR}/asm ${OUT_DIR}/${TARGET_ARCH}-linux-ohos/
cp -rp ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/x86_64-linux-ohos
mv ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/i686-linux-ohos
rm -fr ${OUT_DIR}/asm-x86
rm -fr ${OUT_DIR}/asm-x86

View File

@ -25,4 +25,4 @@ if [ ! -d "${OUT_DIR}" ];then
mkdir -p ${OUT_DIR}
fi
cp -rp ${SOURCE_DIR}/* ${OUT_DIR}
cp -rp ${SOURCE_DIR}/* ${OUT_DIR}

View File

@ -25,7 +25,7 @@ extern "C" {
#define GL_GLES_PROTOTYPES 1
#endif
/* Generated on date 20230220 */
/* Generated on date 20210107 */
/* Generated C header for:
* API: gles2