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 :
11 : #include "tsd.h"
12 : #include <iostream>
13 :
14 1 : int32_t SendUpdateProfilingRspToTsd(
15 : const uint32_t deviceId, const uint32_t waitType, const uint32_t hostPid, const uint32_t vfId)
16 : {
17 : (void)deviceId;
18 : (void)waitType;
19 : (void)hostPid;
20 : (void)vfId;
21 1 : return 0;
22 : }
23 :
24 1 : int32_t CreateOrFindCustPid(
25 : const uint32_t deviceId, const uint32_t loadLibNum, const char* const loadLibName[], const uint32_t hostPid,
26 : const uint32_t vfId, const char* groupNameList, const uint32_t groupNameNum, int32_t* custProcPid, bool* firstStart)
27 : {
28 1 : return 0;
29 : }
30 :
31 1 : int32_t SetSubProcScheduleMode(
32 : const uint32_t deviceId, const uint32_t waitType, const uint32_t hostPid, const uint32_t vfId,
33 : const struct SubProcScheduleModeInfo* scheInfo)
34 : {
35 : (void)deviceId;
36 : (void)waitType;
37 : (void)hostPid;
38 : (void)vfId;
39 : (void)scheInfo;
40 1 : return 0;
41 : }
42 :
43 : extern "C" {
44 : // 修正函数签名,与头文件一致
45 1 : int32_t RegEventMsgCallBackFunc(const struct SubProcEventCallBackInfo* regInfo)
46 : {
47 : (void)regInfo;
48 1 : std::cout << "STUB: RegEventMsgCallBackFunc called" << std::endl;
49 1 : return 0; // 返回 int32_t
50 : }
51 :
52 3 : void UnRegEventMsgCallBackFunc(const uint32_t eventType)
53 : {
54 : (void)eventType;
55 3 : std::cout << "STUB: UnRegEventMsgCallBackFunc called" << std::endl;
56 3 : }
57 :
58 11 : int32_t TsdReportStartOrStopErrCode(
59 : const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId, const char* msg,
60 : uint32_t msgLen)
61 : {
62 : (void)deviceId;
63 : (void)waitType;
64 : (void)hostPid;
65 : (void)vfId;
66 : (void)msg;
67 : (void)msgLen;
68 11 : std::cout << "STUB: TsdReportStartOrStopErrCode called" << std::endl;
69 11 : return 0; // 返回 int32_t
70 : }
71 :
72 6 : int32_t TsdWaitForShutdown(
73 : const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
74 : {
75 : (void)deviceId;
76 : (void)waitType;
77 : (void)hostPid;
78 : (void)vfId;
79 6 : std::cout << "STUB: TsdWaitForShutdown called" << std::endl;
80 6 : return 0; // 返回 int32_t
81 : }
82 :
83 2 : int32_t TsdDestroy(const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId)
84 : {
85 : (void)deviceId;
86 : (void)waitType;
87 : (void)hostPid;
88 : (void)vfId;
89 2 : std::cout << "STUB: TsdDestroy called" << std::endl;
90 2 : return 0; // 返回 int32_t
91 : }
92 :
93 2 : int32_t SubModuleProcessResponse(
94 : const uint32_t deviceId, const TsdWaitType waitType, const uint32_t hostPid, const uint32_t vfId, uint32_t response)
95 : {
96 : (void)deviceId;
97 : (void)waitType;
98 : (void)hostPid;
99 : (void)vfId;
100 : (void)response;
101 2 : std::cout << "STUB: SubModuleProcessResponse called" << std::endl;
102 2 : return 0; // 返回 int32_t
103 : }
104 :
105 : } // extern "C"
|