sw_state_exm_access.c (3245B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * DO NOT EDIT THIS FILE! 8 * This file is auto-generated. 9 * Edits to this file will be lost when it is regenerated. 10 */ 11 12 #include <sal/core/libc.h> 13 #include <shared/swstate/sw_state.h> 14 #include <shared/error.h> 15 #include <shared/swstate/sw_state_defs.h> 16 #include <shared/bsl.h> 17 #include <shared/swstate/access/sw_state_access.h> 18 #include <shared/swstate/access/sw_state_exm_access.h> 19 20 #ifdef _ERR_MSG_MODULE_NAME 21 #error "_ERR_MSG_MODULE_NAME redefined" 22 #endif 23 24 #define _ERR_MSG_MODULE_NAME BSL_LS_SHARED_SWSTATE 25 26 extern shr_sw_state_t *sw_state[BCM_MAX_NUM_UNITS]; 27 28 #ifdef _SHR_SW_STATE_EXM 29 /* AUTO-GENERATED - DO NOT MODIFY */ 30 int sw_state_exm_alloc(int unit){ 31 SW_STATE_INIT_FUNC_DEFS; 32 SHR_SW_STATE_ALLOC( 33 unit, 34 sw_state[unit]->exm, 35 sizeof(two_levels_example_t), 36 SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC, 37 "sw_state_exm_alloc"); 38 SW_STATE_FUNC_RETURN; 39 } 40 41 #endif /* _SHR_SW_STATE_EXM*/ 42 43 #ifdef _SHR_SW_STATE_EXM 44 /* AUTO-GENERATED - DO NOT MODIFY */ 45 int sw_state_exm_is_allocated(int unit, uint8 *is_allocated){ 46 SW_STATE_INIT_FUNC_DEFS; 47 SHR_SW_STATE_IS_ALLOC( 48 unit, 49 sw_state[unit]->exm, 50 is_allocated, 51 SW_STATE_NONE, 52 "sw_state_exm_alloc"); 53 SW_STATE_FUNC_RETURN; 54 } 55 56 #endif /* _SHR_SW_STATE_EXM*/ 57 58 #ifdef _SHR_SW_STATE_EXM 59 /* AUTO-GENERATED - DO NOT MODIFY */ 60 int sw_state_exm_free(int unit){ 61 SW_STATE_INIT_FUNC_DEFS; 62 SHR_SW_STATE_FREE( 63 unit, 64 sw_state[unit]->exm, 65 SW_STATE_NONE, 66 "sw_state_exm_alloc"); 67 SW_STATE_FUNC_RETURN; 68 } 69 70 #endif /* _SHR_SW_STATE_EXM*/ 71 72 #ifdef _SHR_SW_STATE_EXM 73 /* AUTO-GENERATED - DO NOT MODIFY */ 74 int sw_state_exm_verify(int unit){ 75 SW_STATE_INIT_FUNC_DEFS; 76 if (unit >= SOC_MAX_NUM_DEVICES || unit < 0 || sw_state[unit] == NULL) return _SHR_E_UNIT; 77 SW_STATE_NULL_ACCESS_CHECK(sw_state[unit]->exm); 78 SW_STATE_FUNC_RETURN; 79 } 80 81 #endif /* _SHR_SW_STATE_EXM*/ 82 83 84 int 85 sw_state_exm_access_cb_init(int unit){ 86 sw_state_exm_twoLevelsArr_access_cb_init(unit); 87 sw_state_exm_twoLevelsArrArr_access_cb_init(unit); 88 sw_state_exm_twoLevelsArrPtr_access_cb_init(unit); 89 sw_state_exm_twoLevelsPtr_access_cb_init(unit); 90 sw_state_exm_twoLevelsRegular_access_cb_init(unit); 91 sw_state_exm_twoLevelsRegularAllowWbAccess_access_cb_init(unit); 92 sw_state_exm_twoLevelsSinglePtr_access_cb_init(unit); 93 sw_state_exm_twoLevelsStaticArrArr_access_cb_init(unit); 94 sw_state_exm_twoLevelsStaticArrInt_access_cb_init(unit); 95 #ifdef _SHR_SW_STATE_EXM 96 sw_state_access[unit].exm.alloc = sw_state_exm_alloc; 97 #endif /* _SHR_SW_STATE_EXM*/ 98 #ifdef _SHR_SW_STATE_EXM 99 sw_state_access[unit].exm.is_allocated = sw_state_exm_is_allocated; 100 #endif /* _SHR_SW_STATE_EXM*/ 101 #ifdef _SHR_SW_STATE_EXM 102 sw_state_access[unit].exm.free = sw_state_exm_free; 103 #endif /* _SHR_SW_STATE_EXM*/ 104 #ifdef _SHR_SW_STATE_EXM 105 sw_state_access[unit].exm.verify = sw_state_exm_verify; 106 #endif /* _SHR_SW_STATE_EXM*/ 107 return _SHR_E_NONE; 108 } 109 110 #undef _ERR_MSG_MODULE_NAME