forked from epics_driver_modules/motorBase
Improved efficiency
This commit is contained in:
@@ -181,10 +181,12 @@ extern "C" {epicsExportAddress(int, motorRecordDebug);}
|
||||
|
||||
static inline void Debug(int level, const char *format, ...) {
|
||||
#ifdef DEBUG
|
||||
va_list pVar;
|
||||
va_start(pVar, format);
|
||||
if (level < motorRecordDebug) vprintf(format, pVar);
|
||||
va_end(pVar);
|
||||
if (level < motorRecordDebug) {
|
||||
va_list pVar;
|
||||
va_start(pVar, format);
|
||||
vprintf(format, pVar);
|
||||
va_end(pVar);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -71,14 +71,15 @@ volatile int motordrvComdebug = 0;
|
||||
extern "C" {epicsExportAddress(int, motordrvComdebug);}
|
||||
static inline void Debug(int level, const char *format, ...) {
|
||||
#ifdef DEBUG
|
||||
va_list pVar;
|
||||
va_start(pVar, format);
|
||||
if (level < motordrvComdebug) vprintf(format, pVar);
|
||||
va_end(pVar);
|
||||
if (level < motordrvComdebug) {
|
||||
va_list pVar;
|
||||
va_start(pVar, format);
|
||||
vprintf(format, pVar);
|
||||
va_end(pVar);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Function declarations. */
|
||||
static double query_axis(int, struct driver_table *, epicsTime, double);
|
||||
static void process_messages(struct driver_table *, epicsTime, double);
|
||||
|
||||
Reference in New Issue
Block a user