LCOV - code coverage report
Current view: top level - aicpu_cust_schedule/stub - dc.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 96.3 % 54 52
Test Date: 2026-08-12 11:05:02 Functions: 96.3 % 27 26

            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 "task_queue.h"
      12              : #include "tdt/status.h"
      13              : #include "ascend_hal.h"
      14              : 
      15            1 : int SetQueueWorkMode(unsigned int devid, unsigned int qid, int mode)
      16              : {
      17              :     (void)devid;
      18              :     (void)qid;
      19              :     (void)mode;
      20            1 :     return DRV_ERROR_NONE;
      21              : }
      22              : 
      23            1 : drvError_t halQueueInit(unsigned int devid)
      24              : {
      25              :     (void)devid;
      26            1 :     return DRV_ERROR_NONE;
      27              : }
      28              : 
      29            1 : drvError_t halQueueSubscribe(unsigned int devid, unsigned int qid, unsigned int groupId, int type)
      30              : {
      31              :     (void)devid;
      32              :     (void)qid;
      33              :     (void)groupId;
      34              :     (void)type;
      35            1 :     return DRV_ERROR_NONE;
      36              : }
      37              : 
      38            1 : drvError_t halQueueUnsubscribe(unsigned int devid, unsigned int qid)
      39              : {
      40              :     (void)devid;
      41              :     (void)qid;
      42            1 :     return DRV_ERROR_NONE;
      43              : }
      44              : 
      45            1 : drvError_t halQueueSubF2NFEvent(unsigned int devid, unsigned int qid, unsigned int groupid)
      46              : {
      47              :     (void)devid;
      48              :     (void)qid;
      49              :     (void)groupid;
      50            1 :     return DRV_ERROR_NONE;
      51              : }
      52              : 
      53            1 : drvError_t halQueueUnsubF2NFEvent(unsigned int devid, unsigned int qid)
      54              : {
      55              :     (void)devid;
      56              :     (void)qid;
      57            1 :     return DRV_ERROR_NONE;
      58              : }
      59              : 
      60            1 : drvError_t halQueueDeQueue(unsigned int devId, unsigned int qid, void** mbuf)
      61              : {
      62              :     (void)devId;
      63              :     (void)qid;
      64              :     (void)mbuf;
      65            1 :     return DRV_ERROR_NONE;
      66              : }
      67              : 
      68            1 : drvError_t halQueueEnQueue(unsigned int devId, unsigned int qid, void* mbuf)
      69              : {
      70              :     (void)devId;
      71              :     (void)qid;
      72              :     (void)mbuf;
      73            1 :     return DRV_ERROR_NONE;
      74              : }
      75              : 
      76            0 : int halMbufAlloc(unsigned int size, Mbuf** mbuf)
      77              : {
      78              :     (void)size;
      79              :     (void)mbuf;
      80            0 :     return DRV_ERROR_NONE;
      81              : }
      82              : 
      83            1 : int halMbufFree(Mbuf* mbuf)
      84              : {
      85              :     (void)mbuf;
      86            1 :     return DRV_ERROR_NONE;
      87              : }
      88              : 
      89            1 : int halMbufGetPrivInfo(Mbuf* mbuf, void** priv, unsigned int* size)
      90              : {
      91              :     (void)mbuf;
      92              :     (void)priv;
      93              :     (void)size;
      94            1 :     return DRV_ERROR_NONE;
      95              : }
      96              : 
      97            1 : int buff_get_phy_addr(void* buf, unsigned long long* phyAddr)
      98              : {
      99              :     (void)buf;
     100              :     (void)phyAddr;
     101            1 :     return 0;
     102              : }
     103              : 
     104            1 : int halGrpQuery(GroupQueryCmdType cmd, void* inBuff, unsigned int inLen, void* outBuff, unsigned int* outLen)
     105              : {
     106              :     (void)cmd;
     107              :     (void)inBuff;
     108              :     (void)inLen;
     109              :     (void)outBuff;
     110            1 :     *outLen = 0;
     111            1 :     return DRV_ERROR_NONE;
     112              : }
     113              : 
     114            1 : int halGrpAddProc(const char* name, int pid, GroupShareAttr attr)
     115              : {
     116              :     (void)name;
     117              :     (void)pid;
     118              :     (void)attr;
     119            1 :     return DRV_ERROR_NONE;
     120              : }
     121              : 
     122            1 : int halGrpAttach(const char* name, int timeout)
     123              : {
     124              :     (void)name;
     125              :     (void)timeout;
     126            1 :     return DRV_ERROR_NONE;
     127              : }
     128              : 
     129            1 : int halBuffInit(BuffCfg* cfg)
     130              : {
     131              :     (void)cfg;
     132            1 :     return DRV_ERROR_NONE;
     133              : }
     134              : namespace DataPreprocess {
     135            2 : TaskQueueMgr& TaskQueueMgr::GetInstance()
     136              : {
     137            2 :     static TaskQueueMgr instance;
     138            2 :     return instance;
     139              : }
     140              : 
     141            3 : TaskQueueMgr::TaskQueueMgr()
     142              : {
     143            3 :     for (int32_t i = TASK_QUEUE_LOW_PRIORITY; i < TASK_QUEUE_MAX_PRIORITY; ++i) {
     144            2 :         preprocessEventfds_[i] = -1; // initialize fd
     145              :     }
     146            1 : }
     147            3 : TaskQueueMgr::~TaskQueueMgr() {}
     148            1 : void TaskQueueMgr::OnPreprocessEvent(uint32_t eventId) {}
     149              : } // namespace DataPreprocess
     150              : #ifdef __cplusplus
     151              : namespace tdt {
     152            1 : int32_t TDTServerInit(const uint32_t deviceID, const std::list<uint32_t>& bindCoreList)
     153              : {
     154              :     (void)deviceID;
     155              :     (void)bindCoreList;
     156            1 :     return 0;
     157              : }
     158              : 
     159            1 : int32_t TDTServerStop() { return 0; }
     160              : 
     161          506 : StatusFactory* StatusFactory::GetInstance()
     162              : {
     163          506 :     static StatusFactory instance_;
     164          506 :     return &instance_;
     165              : }
     166              : 
     167          504 : void StatusFactory::RegisterErrorNo(const uint32_t err, const std::string& desc) {}
     168              : 
     169            1 : std::string StatusFactory::GetErrDesc(const uint32_t err)
     170              : {
     171              :     (void)err;
     172            2 :     return "";
     173              : }
     174              : 
     175            1 : std::string StatusFactory::GetErrCodeDesc(uint32_t errCode)
     176              : {
     177              :     (void)errCode;
     178            2 :     return "";
     179              : }
     180              : 
     181            1 : StatusFactory::StatusFactory() {}
     182              : } // namespace tdt
     183              : #endif
        

Generated by: LCOV version 2.0-1