Moved static constructor call of iocshRegisterCommon() from iocsh.cpp into
the output from the registerRecordDeviceDriver.pl script, so standalone sequencer programs don't import all of iocCore unnecessarily.
This commit is contained in:
@@ -891,11 +891,10 @@ static void localRegister (void)
|
||||
} /* extern "C" */
|
||||
|
||||
/*
|
||||
* Register commands on application startup
|
||||
* Register local commands on application startup
|
||||
*/
|
||||
#include "iocshRegisterCommon.h"
|
||||
class IocshRegister {
|
||||
public:
|
||||
IocshRegister() { localRegister(); iocshRegisterCommon(); }
|
||||
IocshRegister() { localRegister(); }
|
||||
};
|
||||
static IocshRegister iocshRegisterObj;
|
||||
|
||||
@@ -185,9 +185,13 @@ static void registerRecordDeviceDriverCallFunc(const iocshArgBuf *)
|
||||
/*
|
||||
* Register commands on application startup
|
||||
*/
|
||||
#include "iocshRegisterCommon.h"
|
||||
class IoccrfReg {
|
||||
public:
|
||||
IoccrfReg() { iocshRegister(®isterRecordDeviceDriverFuncDef,registerRecordDeviceDriverCallFunc);}
|
||||
IoccrfReg() {
|
||||
iocshRegisterCommon();
|
||||
iocshRegister(®isterRecordDeviceDriverFuncDef,registerRecordDeviceDriverCallFunc);
|
||||
}
|
||||
};
|
||||
#if !defined(__GNUC__) || !(__GNUC__<2 || (__GNUC__==2 && __GNUC_MINOR__<=95))
|
||||
namespace { IoccrfReg iocshReg; }
|
||||
|
||||
Reference in New Issue
Block a user