blob: b68a3f1327defce0752fae8cd741824d0f340b09 [file] [log] [blame]
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02001/**
2 * @file IxQMgrDispatcher_p.h
3 *
4 * @author Intel Corporation
5 * @date 07-Feb-2002
6 *
7 * @brief This file contains the internal functions for dispatcher
8 *
9 *
10 * @par
11 * IXP400 SW Release version 2.0
12 *
13 * -- Copyright Notice --
14 *
15 * @par
16 * Copyright 2001-2005, Intel Corporation.
17 * All rights reserved.
18 *
19 * @par
Wolfgang Denkc57eadc2013-07-28 22:12:47 +020020 * SPDX-License-Identifier: BSD-3-Clause
Wolfgang Denk4646d2a2006-05-30 15:56:48 +020021 * @par
22 * -- End of Copyright Notice --
23*/
24
25#ifndef IXQMGRDISPATCHER_P_H
26#define IXQMGRDISPATCHER_P_H
27
28/*
29 * User defined include files
30 */
31#include "IxQMgr.h"
32
33/*
34 * This structure defines the statistic data for a queue
35 */
36typedef struct
37{
38 unsigned callbackCnt; /* Call count of callback */
39 unsigned priorityChangeCnt; /* Priority change count */
40 unsigned intNoCallbackCnt; /* Interrupt fired but no callback set count */
41 unsigned intLostCallbackCnt; /* Interrupt lost and detected ; SCR541 */
42 BOOL notificationEnabled; /* Interrupt enabled for this queue */
43 IxQMgrSourceId srcSel; /* interrupt source */
44 unsigned enableCount; /* num times notif enabled by LLP */
45 unsigned disableCount; /* num of times notif disabled by LLP */
46} IxQMgrDispatcherQStats;
47
48/*
49 * This structure defines statistic data for the disatcher
50 */
51typedef struct
52 {
53 unsigned loopRunCnt; /* ixQMgrDispatcherLoopRun count */
54
55 IxQMgrDispatcherQStats queueStats[IX_QMGR_MAX_NUM_QUEUES];
56
57} IxQMgrDispatcherStats;
58
59/*
60 * Initialise the dispatcher component
61 */
62void
63ixQMgrDispatcherInit (void);
64
65/*
66 * Get the dispatcher statistics
67 */
68IxQMgrDispatcherStats*
69ixQMgrDispatcherStatsGet (void);
70
71/**
72 * Retrieve the number of leading zero bits starting from the MSB
73 * This function is implemented as an (extremely fast) asm routine
74 * for XSCALE processor (see clz instruction) and as a (slower) C
75 * function for other systems.
76 */
77unsigned int
78ixQMgrCountLeadingZeros(unsigned int value);
79
80#endif/*IXQMGRDISPATCHER_P_H*/
81
82