openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

mgr.h (710B)


      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  * File:        mgr.h
      8  * Purpose:     Board manager shared declarations
      9  */
     10 
     11 #ifndef   _SRC_BOARD_MANAGER_MGR_H_
     12 #define   _SRC_BOARD_MANAGER_MGR_H_
     13 
     14 #include <sal/core/sync.h>
     15 
     16 extern sal_mutex_t board_lock;
     17 
     18 #define BOARD_INIT { if (board_lock == NULL) { return BCM_E_INIT; } }
     19 #define BOARD_INIT_NULL { if (board_lock == NULL) { return NULL; } }
     20 #define BOARD_LOCK sal_mutex_take(board_lock, sal_mutex_FOREVER)
     21 #define BOARD_UNLOCK sal_mutex_give(board_lock)
     22 
     23 #endif /* _SRC_BOARD_MANAGER_MGR_H_ */