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