Add a compile time knob to disable timing checks (on by default now).

This commit is contained in:
Daniel O'Connor 2012-06-22 20:31:07 +09:30
parent 59ff806081
commit 8d7b0d259f
2 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,7 @@ CFLAGS= @CPPFLAGS@ @CFLAGS@ @PORTAUDIO_CFLAGS@ @SRC_CFLAGS@ @SPANDSP_CFLAGS@ @PT
CFLAGS+=-Wall -Wno-unused-value
#CFLAGS+=-Wunreachable-code
#CFLAGS+=-O0
CFLAGS+=-DDO_TIMING_CHECKS
DEFS= @DEFS@

View File

@ -115,9 +115,13 @@ struct in_addr {
#define bzero(addr,len) memset((addr), 0, (len))
/* @PGS/20120615 */
#ifdef DO_TIMING_CHECKS
#define TIMING_CHECK() _TIMING_CHECK(__FILE__,__FUNCTION__,__LINE__)
void _TIMING_CHECK(const char *file,const char *func,int line);
void TIMING_PAUSE();
#else
#define TIMING_CHECK()
#endif
/* UDP Port numbers for various Serval services.
The overlay mesh works over DNA */