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), processEventFuncPtr_(nullptr),
28 1 : processEventFuncParam_(nullptr),
29 1 : stopProcessEventFuncPtr_(nullptr),
30 1 : stopProcessEventFuncParam_(nullptr)
31 : {
32 : (void)type;
33 1 : }
34 :
35 1 : AicpuMc2MaintenanceThread::~AicpuMc2MaintenanceThread()
36 : {
37 1 : UnitMc2MantenanceProcess();
38 1 : }
39 :
40 1 : int32_t AicpuMc2MaintenanceThread::InitMc2MaintenanceProcess(AicpuMC2MaintenanceFuncPtr loopFun,
41 : void *paramLoopFun, AicpuMC2MaintenanceFuncPtr stopNotifyFun, void *paramStopFun)
42 : {
43 : (void)loopFun;
44 : (void)paramLoopFun;
45 : (void)stopNotifyFun;
46 : (void)paramStopFun;
47 1 : return AICPU_SCHEDULE_OK;
48 : }
49 1 : int32_t AicpuMc2MaintenanceThread::SetMc2MantenanceThreadAffinity()
50 : {
51 1 : return AICPU_SCHEDULE_OK;
52 : }
53 :
54 1 : void AicpuMc2MaintenanceThread::StartProcessEvent()
55 : {
56 1 : return;
57 : }
58 1 : void AicpuMc2MaintenanceThread::ProcessEventFunc() const
59 : {
60 1 : return;
61 : }
62 :
63 1 : void AicpuMc2MaintenanceThread::StopProcessEventFunc() const
64 : {
65 1 : return;
66 : }
67 :
68 2 : void AicpuMc2MaintenanceThread::UnitMc2MantenanceProcess()
69 : {
70 2 : return;
71 : }
72 1 : void AicpuMc2MaintenanceThread::SendMc2CreateThreadMsgToMain() const
73 : {
74 1 : return;
75 : }
76 1 : int32_t AicpuMc2MaintenanceThread::RegisterProcessEventFunc(AicpuMC2MaintenanceFuncPtr funPtr, void *param)
77 : {
78 : (void)funPtr;
79 : (void)param;
80 1 : return AICPU_SCHEDULE_OK;
81 : }
82 :
83 1 : int32_t AicpuMc2MaintenanceThread::RegisterStopProcessEventFunc(AicpuMC2MaintenanceFuncPtr funPtr, void *param)
84 : {
85 : (void)funPtr;
86 : (void)param;
87 1 : return AICPU_SCHEDULE_OK;
88 : }
89 : }
90 :
91 1 : int32_t StartMC2MaintenanceThread(AicpuMC2MaintenanceFuncPtr loopFun,
92 : void *paramLoopFun, AicpuMC2MaintenanceFuncPtr stopNotifyFun, void *paramStopFun)
93 : {
94 : (void)loopFun;
95 : (void)paramLoopFun;
96 : (void)stopNotifyFun;
97 : (void)paramStopFun;
98 1 : return AicpuSchedule::AICPU_SCHEDULE_OK;
99 : }
|