Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #include "aicpusd_mc2_maintenance_thread.h"
11 :
12 : #include <semaphore.h>
13 : #include "aicpusd_drv_manager.h"
14 : #include "aicpusd_info.h"
15 : #include "aicpusd_util.h"
16 : #include "aicpusd_status.h"
17 : #include "aicpusd_interface_process.h"
18 : namespace AicpuSchedule {
19 9 : AicpuMc2MaintenanceThread& AicpuMc2MaintenanceThread::GetInstance(uint32_t type)
20 : {
21 : (void)type;
22 9 : static AicpuMc2MaintenanceThread instance(0);
23 9 : return instance;
24 : }
25 :
26 1 : AicpuMc2MaintenanceThread::AicpuMc2MaintenanceThread(uint32_t type)
27 1 : : initFlag_(false),
28 1 : processEventFuncPtr_(nullptr),
29 1 : processEventFuncParam_(nullptr),
30 1 : stopProcessEventFuncPtr_(nullptr),
31 1 : stopProcessEventFuncParam_(nullptr)
32 : {
33 : (void)type;
34 1 : }
35 :
36 1 : AicpuMc2MaintenanceThread::~AicpuMc2MaintenanceThread() { UnitMc2MantenanceProcess(); }
37 :
38 1 : int32_t AicpuMc2MaintenanceThread::InitMc2MaintenanceProcess(
39 : AicpuMC2MaintenanceFuncPtr loopFun, void* paramLoopFun, AicpuMC2MaintenanceFuncPtr stopNotifyFun,
40 : void* paramStopFun)
41 : {
42 : (void)loopFun;
43 : (void)paramLoopFun;
44 : (void)stopNotifyFun;
45 : (void)paramStopFun;
46 1 : return AICPU_SCHEDULE_OK;
47 : }
48 1 : int32_t AicpuMc2MaintenanceThread::SetMc2MantenanceThreadAffinity() { return AICPU_SCHEDULE_OK; }
49 :
50 1 : void AicpuMc2MaintenanceThread::StartProcessEvent() { return; }
51 1 : void AicpuMc2MaintenanceThread::ProcessEventFunc() const { return; }
52 :
53 1 : void AicpuMc2MaintenanceThread::StopProcessEventFunc() const { return; }
54 :
55 2 : void AicpuMc2MaintenanceThread::UnitMc2MantenanceProcess() { return; }
56 1 : void AicpuMc2MaintenanceThread::SendMc2CreateThreadMsgToMain() const { return; }
57 1 : int32_t AicpuMc2MaintenanceThread::RegisterProcessEventFunc(AicpuMC2MaintenanceFuncPtr funPtr, void* param)
58 : {
59 : (void)funPtr;
60 : (void)param;
61 1 : return AICPU_SCHEDULE_OK;
62 : }
63 :
64 1 : int32_t AicpuMc2MaintenanceThread::RegisterStopProcessEventFunc(AicpuMC2MaintenanceFuncPtr funPtr, void* param)
65 : {
66 : (void)funPtr;
67 : (void)param;
68 1 : return AICPU_SCHEDULE_OK;
69 : }
70 : } // namespace AicpuSchedule
71 :
72 1 : int32_t StartMC2MaintenanceThread(
73 : AicpuMC2MaintenanceFuncPtr loopFun, void* paramLoopFun, AicpuMC2MaintenanceFuncPtr stopNotifyFun,
74 : void* paramStopFun)
75 : {
76 : (void)loopFun;
77 : (void)paramLoopFun;
78 : (void)stopNotifyFun;
79 : (void)paramStopFun;
80 1 : return AicpuSchedule::AICPU_SCHEDULE_OK;
81 : }
|