-
-#ifdef ENABLE_TRACE
-// Add a trace
-#define TRACE(text) BC_Signals::new_trace(text);
-#define SET_TRACE BC_Signals::new_trace(__FILE__, __FUNCTION__, __LINE__);
-#define PRINT_TRACE { printf("%s: %d\n", __FILE__, __LINE__); fflush(stdout); }
-// Delete all traces
-#define UNTRACE BC_Signals::delete_traces();
-
-#else
-
-#define TRACE(text) ;
-#define UNTRACE ;
-#define PRINT_TRACE { printf("%s: %d\n", __FILE__, __LINE__); fflush(stdout); }
-//#define PRINT_TRACE ;
-#define SET_TRACE ;
-
-#endif
-
-
-#ifdef TRACE_LOCKS
-
-// Before user acquires
-#define SET_LOCK(ptr, title, location) int table_id = BC_Signals::set_lock(ptr, title, location);
-// After successful acquisition of a mutex, the table is flagged
-#define SET_LOCK2 BC_Signals::set_lock2(table_id);
-// After successful acquisition of a condition, the table is removed because
-// the user never unlocks a condition after locking it.
-// Release current lock table after failing to acquire
-#define UNSET_LOCK2 BC_Signals::unset_lock2(table_id);
-
-// Release current owner of lock
-#define UNSET_LOCK(ptr) BC_Signals::unset_lock(ptr);
-
-// Delete a lock
-#define UNSET_ALL_LOCKS(ptr) BC_Signals::unset_all_locks(ptr);
-
-#define LOCK_LOCKS(s) BC_Signals::lock_locks(s);
-#define UNLOCK_LOCKS BC_Signals::unlock_locks();
-#define CLEAR_LOCKS_TID(tid) BC_Signals::clear_locks_tid(tid);
-
-#else
-
-#define SET_LOCK(ptr, title, location) ;
-#define SET_LOCK2 ;
-#define SET_LOCK2_CONDITION ;
-#define UNSET_LOCK(ptr) ;
-#define UNSET_LOCK2 ;
-#define UNSET_ALL_LOCKS(ptr) ;
-
-#define LOCK_LOCKS(s) ;
-#define UNLOCK_LOCKS ;
-#define CLEAR_LOCKS_TID(tid) ;
-#endif
-
-
-#ifdef TRACE_MEMORY
-
-#define ENABLE_BUFFER BC_Signals::enable_memory();
-#define DISABLE_BUFFER BC_Signals::disable_memory();
-// Note the size, pointer, and location of an allocation
-#define BUFFER(size, ptr, location) BC_Signals::set_buffer(size, ptr, location);
-// Note the pointer and location of an allocation
-#define BUFFER2(ptr, location) BC_Signals::set_buffer(0, ptr, location);
-// Remove a pointer from the allocation table
-#define UNBUFFER(ptr) BC_Signals::unset_buffer(ptr);
-
-#else
-
-#define ENABLE_BUFFER ;
-#define DISABLE_BUFFER ;
-#define BUFFER(size, ptr, location);
-#define UNBUFFER(ptr);
-
-#endif
-
-// Handling of temporary files in crash
-#define SET_TEMP BC_Signals::set_temp
-#define UNSET_TEMP BC_Signals::unset_temp
-
-// Forks need to reset the lock status in case they forked when a lock was held.
- static void reset_locks();
-
-// Temporary files
- static void delete_temps();
- static void set_temp(char *string);
- static void unset_temp(char *string);