diff --git a/ai/neural_network_runtime/neural_network_runtime.h b/ai/neural_network_runtime/neural_network_runtime.h
index b7740e18b332cf62ae3e71445f2e79965194699d..b5cc5e2fbe56aecd45b3f22abec414b80cd5bdd9 100644
--- a/ai/neural_network_runtime/neural_network_runtime.h
+++ b/ai/neural_network_runtime/neural_network_runtime.h
@@ -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
*/
diff --git a/ai/neural_network_runtime/neural_network_runtime_type.h b/ai/neural_network_runtime/neural_network_runtime_type.h
index 00aefb6562d55ee218615a0a923c6e90423bc633..3bbbb4c528ffe81b10f8c8e73a8fd0c6980d2088 100644
--- a/ai/neural_network_runtime/neural_network_runtime_type.h
+++ b/ai/neural_network_runtime/neural_network_runtime_type.h
@@ -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
*/
diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h
index e128a7d345d784f42381994bf01655c30eb86e00..e7b08a575f39523ba39cef466e9fd38f7e8463b4 100644
--- a/drivers/external_device_manager/usb/usb_ddk_api.h
+++ b/drivers/external_device_manager/usb/usb_ddk_api.h
@@ -47,7 +47,6 @@ extern "C" {
/**
* @brief Initializes the DDK.
*
- * @permission ohos.permission.ACCESS_DDK_USB
* @return 0 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 0 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 OH_Usb_FreeConfigDescriptor\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 bConfigurationValue 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 OH_Usb_FreeConfigDescriptor\n
* to release a descriptor after use.
*
- * @permission ohos.permission.ACCESS_DDK_USB
* @param config Configuration descriptor obtained by calling OH_Usb_GetConfigDescriptor.
* @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 bInterfaceNumber 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 0 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 bAlternateSetting\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 bAlternateSetting\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 Setup Data 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 Setup Data 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 OH_Usb_CreateDeviceMemMap.
* @return 0 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
* OH_Usb_DestroyDeviceMemMap 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 OH_Usb_CreateDeviceMemMap.
* @since 10
* @version 1.0
diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h
index 0099131f645a9479a037e28e42bcbe6c89133430..bb1cb0ddf298629de0de17b2f3f5c7a985b15f83 100644
--- a/graphic/graphic_2d/native_buffer/native_buffer.h
+++ b/graphic/graphic_2d/native_buffer/native_buffer.h
@@ -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 OH_NativeBuffer config. \n
* Used to allocating new OH_NativeBuffer 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;
/**
diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h
index ada8357cb904d7520411aacdf6374414f0517912..6a12316d14c934e54343b83fde6fa2ceb4d08ed2 100644
--- a/graphic/graphic_2d/native_image/native_image.h
+++ b/graphic/graphic_2d/native_image/native_image.h
@@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native image.
*
- * @library libnative_image.so
* @since 9
* @version 1.0
*/
diff --git a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json
index b702a1d7a12bbc2fa3df403e0d1a21ee278e874d..e2c78daa58a279be992ec614bae0a8f928b2ba28 100644
--- a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json
+++ b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json
@@ -1,6 +1,5 @@
[
{ "name": "OH_NativeVSync_Create" },
{ "name": "OH_NativeVSync_Destroy" },
- { "name": "OH_NativeVSync_RequestFrame" },
- { "name": "OH_NativeVSync_GetPeriod" }
+ { "name": "OH_NativeVSync_RequestFrame" }
]
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h
index 2372eb1394d128c3b5faa6d41aece0967ea3928c..fb2d0c0c481e72cbaeb09bc581524177b0e283aa 100644
--- a/graphic/graphic_2d/native_vsync/native_vsync.h
+++ b/graphic/graphic_2d/native_vsync/native_vsync.h
@@ -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
diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h
index 02dbbef3e38a959cb4c353b8eecbbeabda9e378b..81255842603524ce4c56c7dd9ab26cb13f5e9800 100644
--- a/graphic/graphic_2d/native_window/external_window.h
+++ b/graphic/graphic_2d/native_window/external_window.h
@@ -32,7 +32,6 @@
*
* @brief Defines the functions for obtaining and using a native window.
*
- * @library libnative_window.so
* @since 8
* @version 1.0
*/
diff --git a/resourceschedule/ffrt/ffrt.h b/resourceschedule/ffrt/ffrt.h
new file mode 100644
index 0000000000000000000000000000000000000000..de48d6f52afb583387c2076187349ecadc0f4fba
--- /dev/null
+++ b/resourceschedule/ffrt/ffrt.h
@@ -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
diff --git a/security/huks/include/native_huks_param.h b/security/huks/include/native_huks_param.h
index 2da107aa9bd725c8180f1e12b5de767d22d908b3..c375fe1f9a67f82462e984b326bef9acad3cc7af 100644
--- a/security/huks/include/native_huks_param.h
+++ b/security/huks/include/native_huks_param.h
@@ -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.
diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h
index 6dcaa7a8c43cad1cfbb88ee8bbc2110af1d1fd37..9b51f56c9dae5511159e49dabf1c5901854fc51d 100644
--- a/security/huks/include/native_huks_type.h
+++ b/security/huks/include/native_huks_type.h
@@ -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,
};
/**
diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h
index 955759bfb9c18dcf80d22dd9a77fb093a0ccd587..cc1a504ffa0819117379ec6d27513cb97a207445 100644
--- a/startup/init/syscap/include/deviceinfo.h
+++ b/startup/init/syscap/include/deviceinfo.h
@@ -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
*/
diff --git a/third_party/libuv/BUILD.gn b/third_party/libuv/BUILD.gn
index 79322b852dcb9440424413337309936259d396b0..6b4a49b2c5f1d99c61916366a3db19db305ca87a 100644
--- a/third_party/libuv/BUILD.gn
+++ b/third_party/libuv/BUILD.gn
@@ -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"
diff --git a/third_party/libuv/libuv.ndk.json b/third_party/libuv/libuv.ndk.json
new file mode 100644
index 0000000000000000000000000000000000000000..aeff061feeb2d620d78d62283890ab0ecc1f7516
--- /dev/null
+++ b/third_party/libuv/libuv.ndk.json
@@ -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"}
+]
diff --git a/third_party/mindspore/kits/BUILD.gn b/third_party/mindspore/BUILD.gn
similarity index 100%
rename from third_party/mindspore/kits/BUILD.gn
rename to third_party/mindspore/BUILD.gn
diff --git a/third_party/mindspore/kits/context.h b/third_party/mindspore/context.h
similarity index 96%
rename from third_party/mindspore/kits/context.h
rename to third_party/mindspore/context.h
index c377bcc4ce02bc12f5233ac0bc1e5b04effd07b4..0e5ff02311f9e8c5985d492820b38079a3de448e 100644
--- a/third_party/mindspore/kits/context.h
+++ b/third_party/mindspore/context.h
@@ -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.
diff --git a/third_party/mindspore/kits/data_type.h b/third_party/mindspore/data_type.h
similarity index 85%
rename from third_party/mindspore/kits/data_type.h
rename to third_party/mindspore/data_type.h
index 6b709b2b4ad40492f85e7eb871c61e2ffde643cf..124ed17b3cdeca57eafa9b1e945160bf6fefc30b 100644
--- a/third_party/mindspore/kits/data_type.h
+++ b/third_party/mindspore/data_type.h
@@ -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
diff --git a/third_party/mindspore/kits/format.h b/third_party/mindspore/format.h
similarity index 81%
rename from third_party/mindspore/kits/format.h
rename to third_party/mindspore/format.h
index 8cb8a806e521bf0c43876fdc667adbf6c9e86b0f..36b355fe6eead8465cf82b26972196b8d93f9a72 100644
--- a/third_party/mindspore/kits/format.h
+++ b/third_party/mindspore/format.h
@@ -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
diff --git a/third_party/mindspore/kits/model.h b/third_party/mindspore/model.h
similarity index 94%
rename from third_party/mindspore/kits/model.h
rename to third_party/mindspore/model.h
index 03c9e5e1a72a86c3ce074985896ab12b8dc7b317..870b9be3a7c0506a14880bb2aa2c32bf9b958da4 100644
--- a/third_party/mindspore/kits/model.h
+++ b/third_party/mindspore/model.h
@@ -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
diff --git a/third_party/mindspore/kits/status.h b/third_party/mindspore/status.h
similarity index 92%
rename from third_party/mindspore/kits/status.h
rename to third_party/mindspore/status.h
index 6bff13d4f0e32e751cc7236817998fd2f4006293..102c7962a11294d75580d481305d702ee003e3e3 100644
--- a/third_party/mindspore/kits/status.h
+++ b/third_party/mindspore/status.h
@@ -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
diff --git a/third_party/mindspore/kits/tensor.h b/third_party/mindspore/tensor.h
similarity index 94%
rename from third_party/mindspore/kits/tensor.h
rename to third_party/mindspore/tensor.h
index 6261f35f1a38e6379c09fdf351ef2c760b074962..ab936299f53cf3238ffbbe3b819ed26a466179fe 100644
--- a/third_party/mindspore/kits/tensor.h
+++ b/third_party/mindspore/tensor.h
@@ -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
diff --git a/third_party/mindspore/kits/types.h b/third_party/mindspore/types.h
similarity index 88%
rename from third_party/mindspore/kits/types.h
rename to third_party/mindspore/types.h
index 4b45a664b93e85c6293f6e900c723f12c6a678f7..d38660b0dac183a4aed6771085d094c27a221953 100644
--- a/third_party/mindspore/kits/types.h
+++ b/third_party/mindspore/types.h
@@ -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
diff --git a/third_party/musl/ndk_musl_include/aio.h b/third_party/musl/ndk_musl_include/aio.h
index eb89d91698b859db92944f6aa94f4d694f6e95bb..0368ada8ac284cce688ebcee5ee046026b2ced5c 100644
--- a/third_party/musl/ndk_musl_include/aio.h
+++ b/third_party/musl/ndk_musl_include/aio.h
@@ -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
diff --git a/third_party/musl/ndk_musl_include/langinfo.h b/third_party/musl/ndk_musl_include/langinfo.h
index 7c93f17c7f0fef63c6c444913205423f81952519..1246117381a8c334568785bd57bc99c0643c8952 100644
--- a/third_party/musl/ndk_musl_include/langinfo.h
+++ b/third_party/musl/ndk_musl_include/langinfo.h
@@ -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
diff --git a/third_party/musl/ndk_musl_include/malloc.h b/third_party/musl/ndk_musl_include/malloc.h
index 4817d5a5ebf8ad655c947b290d2771779043beb0..86cd9501f2c8715eae3b756f34b6740bbc3ed3c2 100644
--- a/third_party/musl/ndk_musl_include/malloc.h
+++ b/third_party/musl/ndk_musl_include/malloc.h
@@ -9,22 +9,16 @@ extern "C" {
#include
-#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);
diff --git a/third_party/musl/ndk_musl_include/mqueue.h b/third_party/musl/ndk_musl_include/mqueue.h
index 59c8de63a8df769963460ed5f3a99cfa0afa7c9b..4616f0763d93116a3ebc4bd3c1a9d7bc4ccde730 100644
--- a/third_party/musl/ndk_musl_include/mqueue.h
+++ b/third_party/musl/ndk_musl_include/mqueue.h
@@ -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
diff --git a/third_party/musl/ndk_musl_include/pthread.h b/third_party/musl/ndk_musl_include/pthread.h
index 4567237558006ea2324af35debad1402813977ea..33e6a3edaefda5b2faef01a0c29834f256bf5b6b 100644
--- a/third_party/musl/ndk_musl_include/pthread.h
+++ b/third_party/musl/ndk_musl_include/pthread.h
@@ -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
diff --git a/third_party/musl/ndk_musl_include/sys/reboot.h b/third_party/musl/ndk_musl_include/sys/reboot.h
index 88bb1a9c194f6e831b7448a07552b42127c244e3..3f4b7ceca1a22b5107cdc10f866a2abd740b4544 100644
--- a/third_party/musl/ndk_musl_include/sys/reboot.h
+++ b/third_party/musl/ndk_musl_include/sys/reboot.h
@@ -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
diff --git a/third_party/musl/ndk_script/copy_musl_sysroot.sh b/third_party/musl/ndk_script/copy_musl_sysroot.sh
index 07ce2cb3d0e86bf4580e7a68866e7e42c761deb4..d8c700b3b63f98e0381695faecb852b70d101a15 100755
--- a/third_party/musl/ndk_script/copy_musl_sysroot.sh
+++ b/third_party/musl/ndk_script/copy_musl_sysroot.sh
@@ -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
\ No newline at end of file
+rm -fr ${OUT_DIR}/asm-x86
diff --git a/third_party/musl/ndk_script/copy_ndk_musl_headers.sh b/third_party/musl/ndk_script/copy_ndk_musl_headers.sh
index 4f6dfb87a49938867519e2b68b198b0d319bdeae..40d8099fe468cf5977476e42d0545d95c4b6bf37 100755
--- a/third_party/musl/ndk_script/copy_ndk_musl_headers.sh
+++ b/third_party/musl/ndk_script/copy_ndk_musl_headers.sh
@@ -25,4 +25,4 @@ if [ ! -d "${OUT_DIR}" ];then
mkdir -p ${OUT_DIR}
fi
-cp -rp ${SOURCE_DIR}/* ${OUT_DIR}
\ No newline at end of file
+cp -rp ${SOURCE_DIR}/* ${OUT_DIR}
diff --git a/third_party/openGLES/GLES3/gl3.h b/third_party/openGLES/GLES3/gl3.h
index eb823e1e1f30a0b522a5d8d5550b2488858ffedd..a31743e0b35eff6aad2c73e51a82ea8346b9cc93 100644
--- a/third_party/openGLES/GLES3/gl3.h
+++ b/third_party/openGLES/GLES3/gl3.h
@@ -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