From 545346e697fe930b8b7b9bd0ede47890b26a4832 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 5 Mar 2008 10:30:06 +0000 Subject: - changed modules.c calling conventions to be interface-based - moved module loader from conf.c to module.c, where it belongs - made the necessary plumbing to auto-load library modules - upgraded debug system to include iRet in function exit message - changed module interface so that instances need only to be supported by output plugins (if we actually need them for input plugins, we can always add it again...) - milestone: first implementation of library modules (but do not get unloaded on exit/hup so far) --- debug.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'debug.h') diff --git a/debug.h b/debug.h index f39f12a8..27587bd8 100644 --- a/debug.h +++ b/debug.h @@ -93,7 +93,7 @@ int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct timespec *abstime, dbgFuncDB_t *pFuncD, int ln, int iStackPtr); void dbgFree(void *pMem, dbgFuncDB_t *pFuncDB, int ln, int iStackPtr); int dbgEntrFunc(dbgFuncDB_t *pFuncDB, int line); -void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore); +void dbgExitFunc(dbgFuncDB_t *pFuncDB, int iStackPtrRestore, int iRet); void dbgSetExecLocation(int iStackPtr, int line); void dbgSetThrdName(uchar *pszName); void dbgPrintAllDebugInfo(void); @@ -101,12 +101,13 @@ void dbgPrintAllDebugInfo(void); /* macros */ #ifdef RTINST # define BEGINfunc static dbgFuncDB_t dbgFuncDB=dbgFuncDB_t_INITIALIZER; int dbgCALLStaCK_POP_POINT = dbgEntrFunc(&dbgFuncDB,__LINE__); -# define ENDfunc dbgExitFunc(&dbgFuncDB, dbgCALLStaCK_POP_POINT); -// # define ASSERT(x) do { if(!(x)) dbgPrintAllDebugInfo(); assert(x); } while(0); +# define ENDfunc dbgExitFunc(&dbgFuncDB, dbgCALLStaCK_POP_POINT, RS_RET_NO_IRET); +# define ENDfuncIRet dbgExitFunc(&dbgFuncDB, dbgCALLStaCK_POP_POINT, iRet); # define ASSERT(x) assert(x) #else # define BEGINfunc # define ENDfunc +# define ENDfuncIRet # define ASSERT(x) #endif #ifdef RTINST -- cgit v1.2.3