arefHelper.h (760B)
1 /* 2 * 3 * 4 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 5 * 6 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 7 */ 8 #include <shared/bsl.h> 9 #include <bcm/error.h> 10 11 #ifndef AREFHELPER_H 12 #define AREFHELPER_H 13 14 15 #define APICALLCHK(cmd, arg) { int rv; if ( (rv = (cmd arg)) < 0 ) { \ 16 bsl_printf("Error %d : %s %s at file %s line %d\n", rv, #cmd, bcm_errmsg(rv), __FILE__, __LINE__); \ 17 return rv; } } 18 19 #define APICALLCHK_NR(cmd, arg) { int rv; if ( (rv = (cmd arg)) < 0 ) { \ 20 bsl_printf("Error %d : %s at file %s line %d\n", rv, #cmd,__FILE__, __LINE__); return; } } 21 22 23 24 #endif