source: svn/branches/kctv/newcon3bcm2_21bu/magnum/basemodules/dbg/bdbg_os_priv.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: 3.4 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2006-2009, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bdbg_os_priv.h $
11 * $brcm_Revision: Hydra_Software_Devel/2 $
12 * $brcm_Date: 1/26/09 10:33a $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/basemodules/dbg/bdbg_os_priv.h $
19 *
20 * Hydra_Software_Devel/2   1/26/09 10:33a erickson
21 * PR51415: rework bdbg_os_priv interface to not suggest BKNI_EventHandle
22 * usage in BDBG_P_Lock, which must lock in both task and isr contexts
23 *
24 * Hydra_Software_Devel/1   4/27/06 10:10a vle
25 * PR 21065: Redefined BDBG_LOCK and BDBG_UNLOCK to be OS specific
26 * functions.
27 *
28 ***************************************************************************/
29
30
31#ifndef BDBG_OS_PRIV_H__
32#define BDBG_OS_PRIV_H__
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/* The functions below are OS specific and must exist for OS using BDBG module  */
39
40/****************************************************************
41Summary:
42Initialize the OS-specific layer in the DBG basemodule
43****************************************************************/
44BERR_Code BDBG_P_OsInit(void);
45
46/****************************************************************
47Summary:
48Uninitialize the OS-specific layer in the DBG basemodule
49****************************************************************/
50void BDBG_P_OsUninit(void);
51
52/****************************************************************
53Summary:
54Lock BDBG module from multiple accesses.
55
56Description:
57DBG requires that BDBG_P_Lock be implemented per OS.
58BDBG_P_Lock must work in both task and isr modes.
59Therefore, BDBG_P_Lock cannot be implemented by calling BKNI_AcquireMutex or BKNI_EnterCriticalSection which only work in task mode.
60
61Your OS's implementation of BDBG_P_Lock will likely look similar to your OS's implementation of BKNI_EnterCriticalSection.
62For example, in linux user mode, BDBG_P_Lock acquries a pthread mutex.
63For another example, in linux kernel mode, BDBG_P_Lock acquires a spin lock.
64****************************************************************/
65void BDBG_P_Lock(void);
66
67
68/****************************************************************
69Summary:
70Release BDBG module from a BDBG_P_Lock state.
71****************************************************************/
72void BDBG_P_Unlock(void);
73
74
75/****************************************************************
76Summary:
77This function initializes the initial timestamp when BDBG module
78is initialize. This initial timestamp will be used as reference
79for determining the run time thus far.
80****************************************************************/
81void BDBG_P_InitializeTimeStamp(void);
82
83
84/****************************************************************
85Summary:
86This function calculates the run time and convert it into a
87more readable form so that it can be attach to debug messages.
88*****************************************************************/
89void BDBG_P_GetTimeStamp(
90    char *timeStamp,    /* size of the string containing the formatted timestamp */
91    int size_t          /* the formatted timestamp to attach to debug messages */
92    );
93
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
Note: See TracBrowser for help on using the repository browser.