Skip to content

Commit

Permalink
Clean up HPC-GAP changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbehrends committed Dec 2, 2019
1 parent 3aa4d44 commit 3b944e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/hpc/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,12 +1309,21 @@ Region * CurrentRegion(void)
return TLS(currentRegion);
}

// Kernel debugging information for guards.
//
// When compiled with -DDEBUG_GUARDS, the GAP variable GUARD_ERROR_STACK
// will contain the C stack after an error, allowing us to located where
// it occurred without having to fire up a debugger first.
//
// The variables NumReadErrors and NumWriteErrors track the number of
// failed guard checks. These are used in conjunction with the low-level
// function DISABLE_GUARDS() in order to track how many guard failures
// occur in a given section of code.

#ifdef DEBUG_GUARDS
extern GVarDescriptor GUARD_ERROR_STACK;
#endif

// These are temporary debugging functions.

static Int NumReadErrors = 0;
static Int NumWriteErrors = 0;

Expand Down
6 changes: 4 additions & 2 deletions src/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ GAP_STATIC_ASSERT(sizeof(void *) == SIZEOF_VOID_P, "sizeof(void *) is wrong");
#endif
#endif

// If we are not running HPC-GAP, disable read and write guards.
// If we are not running HPC-GAP, guards should be disabled

#ifndef HPCGAP
#undef USE_HPC_GUARDS
#ifdef USE_HPC_GUARDS
#error Do not use --enable-guards without --enable-hpcgap.
#endif
#endif

/****************************************************************************
Expand Down

0 comments on commit 3b944e5

Please sign in to comment.