source: svn/trunk/newcon3bcm2_21bu/nexus/base/include/nexus_base_driver.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 6.2 KB
Line 
1/***************************************************************************
2*     (c)2007-2011 Broadcom Corporation
3*
4*  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5*  and may only be used, duplicated, modified or distributed pursuant to the terms and
6*  conditions of a separate, written license agreement executed between you and Broadcom
7*  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8*  no license (express or implied), right to use, or waiver of any kind with respect to the
9*  Software, and Broadcom expressly reserves all rights in and to the Software and all
10*  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11*  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12*  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13*
14*  Except as expressly set forth in the Authorized License,
15*
16*  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17*  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18*  and to use this information only in connection with your use of Broadcom integrated circuit products.
19*
20*  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21*  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22*  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23*  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24*  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25*  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26*  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27*  USE OR PERFORMANCE OF THE SOFTWARE.
28*
29*  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30*  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31*  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32*  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33*  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34*  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35*  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36*  ANY LIMITED REMEDY.
37*
38* $brcm_Workfile: nexus_base_driver.h $
39* $brcm_Revision: 3 $
40* $brcm_Date: 8/2/11 2:53p $
41*
42* Revision History:
43*
44* $brcm_Log: /nexus/base/include/nexus_base_driver.h $
45*
46* 3   8/2/11 2:53p vsilyaev
47* SW7125-1014 : Add additional scheduler threads for active standby
48*  modules
49*
50* 2   7/21/11 2:31p vsilyaev
51* SW7125-1014 : Add module enable function
52*
53* SW7125-1014/2   8/2/11 10:09a gmohile
54* SW7125-1014 : Add additional scheduler threads for active standby
55*  modules
56*
57* SW7125-1014/1   7/12/11 3:05p gmohile
58* SW7125-1014 : Add module enable function
59*
60* 1   9/24/10 9:23a erickson
61* SW7420-943: add files
62*
63***************************************************************************/
64#ifndef NEXUS_BASE_DRIVER_H__
65#define NEXUS_BASE_DRIVER_H__
66
67#include "nexus_base_types.h"
68
69#ifdef __cplusplus
70#error Internal header file cannot be built by C++ compiler
71#endif
72
73/**
74Base API's which need to be called from platform/driver code which doesn't need or have access to nexus_base.h
75**/
76
77/**
78Summary:
79Enumerate registered modules
80
81Description:
82This function is used to enumerate all registered nexus modules.  callback
83will be called with a pointer to the module settings used to initialize the
84module.
85
86See Also:
87NEXUS_Module_Create
88**/
89void NEXUS_Module_EnumerateAll(
90    void (*callback)(void *context, NEXUS_ModuleHandle module, const char *pModuleName, const NEXUS_ModuleSettings *pSettings),
91    void *context
92    );
93
94/**
95Summary:
96Macro to lock a module with debug tagging.
97
98Description:
99
100See Also:
101NEXUS_LockModule
102**/
103#define NEXUS_Module_Lock(module) NEXUS_Module_Lock_Tagged((module), __FILE__, __LINE__)
104
105/**
106Summary:
107Macro to try to lock a module with debug tagging.
108
109Description:
110
111See Also:
112NEXUS_TryLockModule
113**/
114#define NEXUS_Module_TryLock(module) NEXUS_Module_TryLock_Tagged((module), __FILE__, __LINE__)
115
116/**
117Summary:
118Macro to unlock a module with debug tagging.
119
120Description:
121
122See Also:
123NEXUS_UnlockModule
124**/
125#define NEXUS_Module_Unlock(module) NEXUS_Module_Unlock_Tagged((module), __FILE__, __LINE__)
126
127/**
128Summary:
129Actual function called by NEXUS_LockModule macro.
130
131Description:
132
133See Also:
134NEXUS_LockModule
135**/
136void NEXUS_Module_Lock_Tagged(
137    NEXUS_ModuleHandle module,
138    const char *pFileName,
139    unsigned lineNumber
140    );
141
142/**
143Summary:
144Actual function called by NEXUS_TryLockModule macro.
145
146Description:
147
148See Also:
149NEXUS_TryLockModule
150**/
151bool NEXUS_Module_TryLock_Tagged(
152    NEXUS_ModuleHandle module,
153    const char *pFileName,
154    unsigned lineNumber
155    );
156
157/**
158Summary:
159Actual function called by NEXUS_UnlockModule macro.
160
161Description:
162
163See Also:
164NEXUS_UnlockModule
165**/
166void NEXUS_Module_Unlock_Tagged(
167    NEXUS_ModuleHandle module,
168    const char *pFileName,
169    unsigned lineNumber
170    );
171
172void NEXUS_Module_GetPriority(
173    NEXUS_ModuleHandle module,
174    NEXUS_ModulePriority *pPriority
175    );
176
177/**
178Summary:
179Returns true if given module could be left active during active standby
180**/
181bool NEXUS_Module_ActiveStandyCompatible(
182    NEXUS_ModuleHandle module
183    );
184
185
186/**
187Summary:
188Macro to enable a module with debug tagging.
189
190Description:
191
192See Also:
193**/
194#define NEXUS_Module_Enable(module) NEXUS_Module_Enable_Tagged((module), __FILE__, __LINE__)
195
196/**
197Summary:
198Macro to disable a module with debug tagging.
199
200Description:
201
202See Also:
203**/
204#define NEXUS_Module_Disable(module) NEXUS_Module_Disable_Tagged((module), __FILE__, __LINE__)
205
206/**
207Summary:
208Actual function called by NEXUS_Module_Enable macro.
209
210Description:
211
212See Also:
213**/
214void NEXUS_Module_Enable_Tagged(
215    NEXUS_ModuleHandle module,
216    const char *pFileName,
217    unsigned lineNumber
218    );
219
220/**
221Summary:
222Actual function called by NEXUS_Module_Disable macro.
223
224Description:
225
226See Also:
227**/
228void NEXUS_Module_Disable_Tagged(
229    NEXUS_ModuleHandle module,
230    const char *pFileName,
231    unsigned lineNumber
232    );
233
234#endif /* !defined NEXUS_BASE_DRIVER_H__ */
235
236
Note: See TracBrowser for help on using the repository browser.