Navigation Menu

Skip to content

Commit

Permalink
dFunctionBegin: hide when not PETSC_USE_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Mar 16, 2013
1 parent 944e5cb commit 005e359
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/dohp.h
Expand Up @@ -189,8 +189,9 @@ static inline void *dNextAlignedAddr(size_t alignment,void *ptr)
# define dFree7(a,b,c,d,e,f,g) dFree(a) # define dFree7(a,b,c,d,e,f,g) dFree(a)
#endif #endif


#if defined(PETSC_USE_DEBUG)
/* This is like PetscFunctionBegin, but does not check __FUNCT__ because we have C99 */ /* This is like PetscFunctionBegin, but does not check __FUNCT__ because we have C99 */
#define dFunctionBegin \ # define dFunctionBegin \
do { \ do { \
PetscStack* petscstackp; \ PetscStack* petscstackp; \
petscstackp = (PetscStack*)PetscThreadLocalGetValue(petscstack); \ petscstackp = (PetscStack*)PetscThreadLocalGetValue(petscstack); \
Expand All @@ -203,6 +204,9 @@ static inline void *dNextAlignedAddr(size_t alignment,void *ptr)
petscstackp->currentsize++; \ petscstackp->currentsize++; \
} \ } \
} while (0) } while (0)
#else
# define dFunctionBegin do {} while(0)
#endif


#define dFunctionReturn(a) PetscFunctionReturn(a) #define dFunctionReturn(a) PetscFunctionReturn(a)


Expand Down

0 comments on commit 005e359

Please sign in to comment.