src/misc/debug.h File Reference

Debugging helper MACROs. More...

#include <stdio.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define TXC_DEBUG_POOL   txc_runtime_settings.debug_pool
#define TXC_DEBUG_KOA   txc_runtime_settings.debug_koa
#define TXC_DEBUG_SENTINEL   txc_runtime_settings.debug_sentinel
#define TXC_DEBUG_TX   txc_runtime_settings.debug_tx
#define TXC_DEBUG_XCALL   txc_runtime_settings.debug_xcall
#define TXC_DEBUG_OUT   stderr
#define timevalclear(tvp)   ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timevaladd(vvp, uvp)
#define timevalsub(vvp, uvp)
#define TXC_INTERNALERROR(msg,)
#define TXC_ERROR(msg,)   txc_debug_printmsg(NULL, 0, 1, "Error", msg, ##__VA_ARGS__ )
#define TXC_WARNING(msg,)   ((void) 0)
#define TXC_DEBUG_PRINT(debug_level, msg,)   ((void) 0)
#define TXC_ASSERT(condition)   ((void) 0)

Functions

void txc_debug_printmsg (char *file, int line, int fatal, const char *prefix, const char *strformat,...)
void txc_debug_printmsg_L (int debug_level, const char *strformat,...)


Detailed Description

Debugging helper MACROs.

Definition in file debug.h.


Define Documentation

#define timevaladd ( vvp,
uvp   ) 

Value:

do {                                                                    \
        (vvp)->tv_sec += (uvp)->tv_sec;                                     \
        (vvp)->tv_usec += (uvp)->tv_usec;                                   \
        if ((vvp)->tv_usec >= 1000000) {                                    \
            (vvp)->tv_sec++;                                                \
            (vvp)->tv_usec -= 1000000;                                      \
        }                                                                   \
    } while (0)

Definition at line 25 of file debug.h.

#define timevalsub ( vvp,
uvp   ) 

Value:

do {                                                                    \
        (vvp)->tv_sec -= (uvp)->tv_sec;                                     \
        (vvp)->tv_usec -= (uvp)->tv_usec;                                   \
        if ((vvp)->tv_usec < 0) {                                           \
            (vvp)->tv_sec--;                                                \
            (vvp)->tv_usec += 1000000;                                      \
        }                                                                   \
    } while (0)

Definition at line 35 of file debug.h.

#define TXC_INTERNALERROR ( msg   ) 

Value:

txc_debug_printmsg(__FILE__, __LINE__, 1, "Internal Error: ",           \
                       msg, ##__VA_ARGS__ )

Definition at line 46 of file debug.h.

Referenced by txc_buffer_circular_create(), txc_buffer_linear_create(), txc_koa_attach_fd(), txc_koa_create(), txc_pool_object_first(), txc_sentinel_create(), txc_sentinel_tryacquire(), txc_tx_create(), x_close(), x_create(), x_dup(), x_fsync(), x_lseek(), x_open(), x_pipe(), x_pthread_mutex_lock(), x_pthread_mutex_unlock(), x_read(), x_read_pipe(), x_recvmsg(), x_rename(), x_sendmsg(), x_socket(), x_unlink(), and x_write_pipe().


Generated on Wed Dec 9 20:32:40 2009 for xCalls by  doxygen 1.4.7