From f109fc1d25a27d978e0bf59637ec4b248aa91464 Mon Sep 17 00:00:00 2001 From: zhangqing Date: Wed, 11 Dec 2024 20:20:28 +0800 Subject: [PATCH] arkui-x update master OH to weekly_20241209 and OH fix build bug Signed-off-by: zhangqing Change-Id: I5085c1ad7676cdb053b0cabbcd6b6dd6b46a0ff2 --- common/include/concurrent_task_utils.h | 25 ----------------------- common/src/concurrent_task_utils.cpp | 28 -------------------------- qos/BUILD.gn | 2 -- services/BUILD.gn | 3 +-- services/src/qos_interface.cpp | 19 ++++++----------- 5 files changed, 7 insertions(+), 70 deletions(-) delete mode 100644 common/include/concurrent_task_utils.h delete mode 100644 common/src/concurrent_task_utils.cpp diff --git a/common/include/concurrent_task_utils.h b/common/include/concurrent_task_utils.h deleted file mode 100644 index 96ead4a..0000000 --- a/common/include/concurrent_task_utils.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2024 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 CONCURRENT_TASK_COMMON_INCLUDE_CONCURRENT_TASK_UTILS_H -#define CONCURRENT_TASK_COMMON_INCLUDE_CONCURRENT_TASK_UTILS_H - -#include - - -uint64_t GetAddrTag(void* addr); - - -#endif // CONCURRENT_TASK_COMMON_INCLUDE_CONCURRENT_TASK_UTILS_H \ No newline at end of file diff --git a/common/src/concurrent_task_utils.cpp b/common/src/concurrent_task_utils.cpp deleted file mode 100644 index 82df7b7..0000000 --- a/common/src/concurrent_task_utils.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2024 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. - */ - -#include -#include -#include "concurrent_task_utils.h" - - -uint64_t GetAddrTag(void* addr) -{ - uint64_t tag = 0; - if (addr != nullptr) { - tag = fdsan_create_owner_tag(FDSAN_OWNER_TYPE_FILE, (uint64_t)addr); - } - return tag; -} \ No newline at end of file diff --git a/qos/BUILD.gn b/qos/BUILD.gn index 2e29882..8372df9 100644 --- a/qos/BUILD.gn +++ b/qos/BUILD.gn @@ -19,7 +19,6 @@ config("qos_config") { "../include/", "../interfaces/inner_api/", "../services/include/", - "../common/include/", ] } @@ -39,7 +38,6 @@ ohos_shared_library("qos") { ] public_configs = [ ":qos_config" ] sources = [ - "../common/src/concurrent_task_utils.cpp", "../services/src/qos_interface.cpp", "qos.cpp", ] diff --git a/services/BUILD.gn b/services/BUILD.gn index 5cb3d24..8c23109 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -25,7 +25,7 @@ config("concurrent_task_config") { "../include", "../frameworks/concurrent_task_client/include/", "../interfaces/inner_api/", - "../common/include/", + "../common/include", ] } @@ -53,7 +53,6 @@ ohos_shared_library("concurrentsvc") { ldflags = [ "-Wl,--exclude-libs=ALL" ] sources = [ - "../common/src/concurrent_task_utils.cpp", "src/concurrent_task_controller_interface.cpp", "src/concurrent_task_service.cpp", "src/concurrent_task_service_ability.cpp", diff --git a/services/src/qos_interface.cpp b/services/src/qos_interface.cpp index 4caa882..ebabca7 100644 --- a/services/src/qos_interface.cpp +++ b/services/src/qos_interface.cpp @@ -27,7 +27,6 @@ #include #include "concurrent_task_log.h" -#include "concurrent_task_utils.h" static int TrivalOpenRtgNode(void) { @@ -62,14 +61,13 @@ int EnableRtg(bool flag) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); int ret = ioctl(fd, CMD_ID_SET_ENABLE, &enableData); if (ret < 0) { CONCUR_LOGE("set rtg config enable failed."); } - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return 0; }; @@ -87,7 +85,6 @@ int QosApplyForOther(unsigned int level, int tid) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); struct QosCtrlData data; data.level = level; @@ -98,7 +95,7 @@ int QosApplyForOther(unsigned int level, int tid) if (ret < 0) { CONCUR_LOGE("[Interface] task %{public}d apply qos failed, errno = %{public}d", tid, errno); } - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return ret; } @@ -108,7 +105,6 @@ int QosLeave(void) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); struct QosCtrlData data; data.type = static_cast(QosManipulateType::QOS_LEAVE); @@ -118,7 +114,7 @@ int QosLeave(void) if (ret < 0) { CONCUR_LOGE("[Interface] task %{public}d leave qos failed, errno = %{public}d", gettid(), errno); } - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return ret; } @@ -128,7 +124,6 @@ int QosLeaveForOther(int tid) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); struct QosCtrlData data; data.type = static_cast(QosManipulateType::QOS_LEAVE); @@ -138,7 +133,7 @@ int QosLeaveForOther(int tid) if (ret < 0) { CONCUR_LOGE("[Interface] task %{public}d leave qos failed, errno = %{public}d", tid, errno); } - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return ret; } @@ -148,13 +143,12 @@ int QosPolicySet(const struct QosPolicyDatas* policyDatas) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); int ret = ioctl(fd, QOS_CTRL_POLICY_OPERATION, policyDatas); if (ret < 0) { CONCUR_LOGE("[Interface] set qos policy failed, errno = %{public}d", errno); } - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return ret; } @@ -170,7 +164,6 @@ int QosGetForOther(int tid, int& level) if (fd < 0) { return fd; } - fdsan_exchange_owner_tag(fd, 0, GetAddrTag(static_cast(&fd))); struct QosCtrlData data; data.type = static_cast(QosManipulateType::QOS_GET); @@ -183,6 +176,6 @@ int QosGetForOther(int tid, int& level) } level = data.qos; - fdsan_close_with_tag(fd, GetAddrTag(static_cast(&fd))); + close(fd); return ret; } \ No newline at end of file -- Gitee