fix review

Signed-off-by: zhuguoyang <zhuguoyang@h-partners.com>
This commit is contained in:
zhuguoyang 2024-04-13 22:07:37 +08:00
parent 9688cfc705
commit 50ce05c361
2 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@
#include "string_ex.h"
#include "sys_binder.h"
#ifdef FFRT_IPC_ENABLE
#include "ffrtadapter"
#include "ffrtadapter.h"
#endif
#if defined(__arm__) || defined(__aarch64__)
@ -164,15 +164,15 @@ int BinderInvoker::SendRequest(int handle, uint32_t code, MessageParcel &data, M
error = WaitForCompletion(nullptr);
} else {
#ifdef FFRT_IPC_ENABLE
auto ffrtTaskSetLegacyMode = FFRTAdapter::Instance()->FfrtTaskSetLegacyMode;
auto ffrtSetTaskLegacyMode = FFRTAdapter::Instance()->FfrtSetTaskLegacyMode;
if (ffrtTaskSetLegacyMode == nullptr) {
return IPC_SKELETON_NULL_OBJECT_ERR;
return IPC_INVOKER_ERR;
}
ffrtTaskSetLegacyMode(true);
ffrtSetTaskLegacyMode(true);
#endif
error = WaitForCompletion(&reply);
#ifdef FFRT_IPC_ENABLE
ffrtTaskSetLegacyMode(false);
ffrtSetTaskLegacyMode(false);
#endif
}
HitraceInvoker::TraceClientReceieve(handle, code, flags, traceId, childId);

View File

@ -21,7 +21,7 @@
#include "ipc_debug.h"
namespace OHOS {
static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC_BASE, "ipc_ffrt_object" }
static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC_BASE, "ipc_ffrt_object" };
void ffrt_this_task_set_legacy_mode(bool mode);
using FfrtTaskSetLegacyModeType = decltype(ffrt_this_task_set_legacy_mode)*;
#ifdef __aarch64__