#ifndef __OSPDIAGCH__
#define __OSPDIAGCH__

#include "ospTypes.h"

#ifdef __cplusplus
extern "C" {
#endif
#define DIAG_CNTID0  0
#define DIAG_CNTID1  1
#define DIAG_CNTID2  2
#define DIAG_CNTID3  3
#define DIAG_CNTID4  4
#define DIAG_CNTID5  5
#define DIAG_CNTID6  6
#define DIAG_CNTID7  7
#define DIAG_CNTID8  8
#define DIAG_CNTID9  9
#define DIAG_CNTID10  10
#define DIAG_CNTID11  11
#define DIAG_CNTID12  12
#define DIAG_CNTID13  13
#define DIAG_CNTID14  14
#define DIAG_CNTID15  15
#define DIAG_CNTID16  16
#define DIAG_CNTID17  17
#define DIAG_CNTID18  18
#define DIAG_CNTID19  19
#define DIAG_CNTID20  20
#define DIAG_CNTID21  21
#define DIAG_CNTID22  22
#define DIAG_CNTID23  23
#define DIAG_CNTID24  24
#define DIAG_CNTID25  25
#define DIAG_CNTID26  26
#define DIAG_CNTID27  27
#define DIAG_CNTID28  28
#define DIAG_CNTID29  29
#define DIAG_CNTID30  30
#define DIAG_CNTID31  31
#define DIAG_CNTID32  32
#define DIAG_CNTID33  33
#define DIAG_CNTID34  34
#define DIAG_CNTID35   35
#define DIAG_CNTID36   36
#define DIAG_CNTID37   37
#define DIAG_CNTID38   38
#define DIAG_CNTID39   39
#define DIAG_CNTID40   40
#define DIAG_CNTID41   41
#define DIAG_CNTID42   42
#define DIAG_CNTID43   43
#define DIAG_CNTID44   44
#define DIAG_CNTID45   45
#define DIAG_CNTID46   46
#define DIAG_CNTID47   47
#define DIAG_CNTID48   48
#define DIAG_CNTID49   49
#define DIAG_CNTID50   50
#define DIAG_CNTID51   51
#define DIAG_CNTID52   52
#define DIAG_CNTID53   53
#define DIAG_CNTID54   54
#define DIAG_CNTID55   55
#define DIAG_CNTID56   56
#define DIAG_CNTID57   57
#define DIAG_CNTID58   58
#define DIAG_CNTID59   59
#define DIAG_CNTID60   60
#define DIAG_CNTID61   61
#define DIAG_CNTID62   62
#define DIAG_CNTID63   63



#define CNT_NUM_PER_TASK    64
extern uint64_t *g_DiagCntBase;
#define TASK_CNT_ADD(TaskId, CntId) osp_atomic64_inc((int64_t *)(g_DiagCntBase + TaskId *CNT_NUM_PER_TASK + CntId))
#define TASK_CNT_SET(TaskId, CntId, Val) osp_atomic64_set((int64_t *)(g_DiagCntBase + TaskId *CNT_NUM_PER_TASK + CntId), Val)
#define TASK_CNT_GET(TaskId, CntId) osp_atomic64_get((int64_t *)(g_DiagCntBase + TaskId *CNT_NUM_PER_TASK + CntId))

int32_t osp_diag_init(void);
OSP_STATUS OspCntAdd(uint32_t TaskId, uint32_t CntId);
OSP_STATUS OspCntSet(uint32_t TaskId, uint32_t CntId, uint64_t Val);
uint32_t osp_diag_cnt_str(uint32_t TaskId, char *pstr, uint32_t inlen);
int32_t osp_diag_cnt_init(void);
OSP_STATUS osp_show_tsk_diag_cnt(uint32_t TaskId);
OSP_STATUS osp_diag_cnt_add(uint32_t TaskId, uint32_t CntId);




#ifdef __cplusplus
}
#endif

#endif  /*__OSPRTCH__ */

