| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2008, 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: bvbi_prot.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/1 $ |
|---|
| 12 | * $brcm_Date: 12/3/08 7:47p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * This piece of the BVBI porting interface implements a "usage count" |
|---|
| 16 | * property of the BVBI field handle. The functions in this file will |
|---|
| 17 | * enforce the requiremente that the usage count must be non-negative at all |
|---|
| 18 | * times. Note that the usage count is used extensively by the BVBIlib |
|---|
| 19 | * syslib. Therefore, users who access the usage count property themselves |
|---|
| 20 | * should NOT use BVBIlib. |
|---|
| 21 | * |
|---|
| 22 | * Revision History: |
|---|
| 23 | * |
|---|
| 24 | * $brcm_Log: /magnum/portinginterface/vbi/7400/bvbi_prot.h $ |
|---|
| 25 | * |
|---|
| 26 | * Hydra_Software_Devel/1 12/3/08 7:47p darnstein |
|---|
| 27 | * PR45819: Source files for 7400 are no longer symbolic links. |
|---|
| 28 | * |
|---|
| 29 | * Hydra_Software_Devel/5 12/13/04 7:40p darnstein |
|---|
| 30 | * PR 13255: When recycling a field handle, clear out all its attributes. |
|---|
| 31 | * |
|---|
| 32 | * Hydra_Software_Devel/4 7/27/04 2:32p darnstein |
|---|
| 33 | * PR 9080: add full documentation to the functions declared here. |
|---|
| 34 | * |
|---|
| 35 | * Hydra_Software_Devel/3 7/27/04 11:11a darnstein |
|---|
| 36 | * PR 9080: don't use private functions to access field handle usage count |
|---|
| 37 | * in BVBI porting interface. It is against the rules. |
|---|
| 38 | * |
|---|
| 39 | * Hydra_Software_Devel/2 10/9/03 6:42p darnstein |
|---|
| 40 | * Change name of several functions to indicate that they may be called |
|---|
| 41 | * from an ISR. |
|---|
| 42 | * |
|---|
| 43 | * Hydra_Software_Devel/1 10/9/03 1:13p darnstein |
|---|
| 44 | * Initial version |
|---|
| 45 | * |
|---|
| 46 | ***************************************************************************/ |
|---|
| 47 | #ifndef BVBI_PROT_H__ |
|---|
| 48 | #define BVBI_PROT_H__ |
|---|
| 49 | |
|---|
| 50 | #include "bvbi.h" |
|---|
| 51 | |
|---|
| 52 | #ifdef __cplusplus |
|---|
| 53 | extern "C" { |
|---|
| 54 | #endif |
|---|
| 55 | |
|---|
| 56 | /* |
|---|
| 57 | Note: These functions manipulate the "usage count" attribute of a |
|---|
| 58 | ---- BVBI_Field_Handle. This attribute is used heavily in the syslib |
|---|
| 59 | module BVBIlib. Therefore, these functions should NOT be used by |
|---|
| 60 | most users. |
|---|
| 61 | */ |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | /***************************************************************************** |
|---|
| 65 | Summary: |
|---|
| 66 | Sets the "usage count" property of a field handle to zero. |
|---|
| 67 | |
|---|
| 68 | Description: |
|---|
| 69 | This function sets the usage count property of a field handle to zero. |
|---|
| 70 | Note that the usage count property is used extensively by the BVBIlib |
|---|
| 71 | syslib. Therefore, if a user modifies this property directly, BVBIlib |
|---|
| 72 | should NOT be used. |
|---|
| 73 | *****************************************************************************/ |
|---|
| 74 | void BVBI_Field_Zero_UsageCount_isr ( |
|---|
| 75 | BVBI_Field_Handle fieldHandle /* [in] A valid BVBI_Field_Handle object */ |
|---|
| 76 | ); |
|---|
| 77 | |
|---|
| 78 | /***************************************************************************** |
|---|
| 79 | Summary: |
|---|
| 80 | Increments the "usage count" property of a field handle. |
|---|
| 81 | |
|---|
| 82 | Description: |
|---|
| 83 | This function increments the usage count property of a field handle. |
|---|
| 84 | Note that the usage count property is used extensively by the BVBIlib |
|---|
| 85 | syslib. Therefore, if a user modifies this property directly, BVBIlib |
|---|
| 86 | should NOT be used. |
|---|
| 87 | *****************************************************************************/ |
|---|
| 88 | void BVBI_Field_Increment_UsageCount_isr ( |
|---|
| 89 | BVBI_Field_Handle fieldHandle /* [in] A valid BVBI_Field_Handle object */ |
|---|
| 90 | ); |
|---|
| 91 | |
|---|
| 92 | /***************************************************************************** |
|---|
| 93 | Summary: |
|---|
| 94 | Decrements the "usage count" property of a field handle. |
|---|
| 95 | |
|---|
| 96 | Description: |
|---|
| 97 | This function decrements the usage count property of a field handle. |
|---|
| 98 | Note that the usage count property is used extensively by the BVBIlib |
|---|
| 99 | syslib. Therefore, if a user modifies this property directly, BVBIlib |
|---|
| 100 | should NOT be used. |
|---|
| 101 | *****************************************************************************/ |
|---|
| 102 | void BVBI_Field_Decrement_UsageCount_isr ( |
|---|
| 103 | BVBI_Field_Handle fieldHandle /* [in] A valid BVBI_Field_Handle object */ |
|---|
| 104 | ); |
|---|
| 105 | |
|---|
| 106 | /***************************************************************************** |
|---|
| 107 | Summary: |
|---|
| 108 | Obtains the "usage count" property of a field handle. |
|---|
| 109 | |
|---|
| 110 | Description: |
|---|
| 111 | This function returns the usage count property of a field handle. |
|---|
| 112 | Note that the usage count property is used extensively by the BVBIlib |
|---|
| 113 | syslib. Therefore, if a user modifies this property directly, BVBIlib |
|---|
| 114 | should NOT be used. |
|---|
| 115 | |
|---|
| 116 | Returns: |
|---|
| 117 | The usage count of the field handle. |
|---|
| 118 | *****************************************************************************/ |
|---|
| 119 | int BVBI_Field_Get_UsageCount_isr ( |
|---|
| 120 | BVBI_Field_Handle fieldHandle /* [in] A valid BVBI_Field_Handle object */ |
|---|
| 121 | ); |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | /***************************************************************************** |
|---|
| 125 | Summary: |
|---|
| 126 | Prepares a field handle for re-use by clearing out attributes. |
|---|
| 127 | |
|---|
| 128 | Description: |
|---|
| 129 | This function resets these attributes of a field handle: |
|---|
| 130 | - What VBI data is contained and valid. |
|---|
| 131 | - What error conditions have been encountered. |
|---|
| 132 | - What field polarities (top, bottom, both) are valid for the field |
|---|
| 133 | handle. |
|---|
| 134 | This function does not change the "usage count" property of the field |
|---|
| 135 | handle. |
|---|
| 136 | |
|---|
| 137 | See Also: |
|---|
| 138 | BVBI_Field_Zero_UsageCount_isr |
|---|
| 139 | *****************************************************************************/ |
|---|
| 140 | void BVBI_Field_ClearState_isr ( |
|---|
| 141 | BVBI_Field_Handle fieldHandle /* [in] A valid BVBI_Field_Handle object */ |
|---|
| 142 | ); |
|---|
| 143 | |
|---|
| 144 | #ifdef __cplusplus |
|---|
| 145 | } |
|---|
| 146 | #endif |
|---|
| 147 | |
|---|
| 148 | #endif /* #ifndef BVBI_PROT_H__ */ |
|---|
| 149 | |
|---|
| 150 | /* End of file. */ |
|---|