> Subject: Tornado
> Some recent email on the subject of Tornoda indicates that both CEBAF
> and LBL will upgrade to Tornado. It was also indicated that the intent
> is not to use the C++ classes which would make portability and future
> EPICS development dependent on purchasing these classes. Steve Lewis
> indicated in his notes on Tornado that the Wind Foundation Classes,
> which include iostream, Rogue Wave's tools.h++, Booch classes and
> various wrapper classes are unbundled products. Is there a policy that
> none of these classes would be required for future EPICS enhancements?
We (John and I) believe that increasing are dependancies on proprietary
tools and libraries is probably not in our best interest.
>
> I am unclear as to the role of the Tornado bundled C++ global
> constructors/desctructors. Are these used by the Tornado agent only?
Here is a non-Tornado solution to the global constructors/destructors
problem mentioned in the Tornado discussions. This code allows a user to
load GNU g++ compiled object files. It handles global constructors
and provides global new and delete operators. Hopefully this was not a
big incentive to upgrade to Tornado.
Jim and John
-----------------------------------------------------------------------------
#include <vxWorks.h>
#include <vme.h>
#include <stdio.h>
#include <symLib.h>
#include <ioLib.h>
#include <sysSymTbl.h>
#include <sysLib.h>
#include <moduleLib.h>
#include <usrLib.h>
#include <a_out.h>
#ifdef __cplusplus
extern "C" {
#endif
void cpp_main(void);
MODULE_ID ldpp (int syms, BOOL noAbort, char *name);
void* __builtin_new(int sz);
void __builtin_delete (void *ptr);
#ifdef __cplusplus
}
#endif
typedef void (*func_ptr) (void);
/* ------------------------------------------------------------------ */
/*
C++ loader for vxWorks, it runs constructors and such
*/
/* ------------------------------------------------------------------ */
MODULE_ID ldpp (int syms, BOOL noAbort, char *name)
{
MODULE_ID ret;
ret = ld(syms,noAbort,name);
if(ret) cpp_main();
return ret;
}
void cpp_main(void)
{
SYM_TYPE stype;
func_ptr p;
func_ptr *ctorlist;
int i;
if( symFindByName(sysSymTbl,"___CTOR_LIST__",
(char**)&ctorlist,&stype)==ERROR)
{
return;
}
else
{
for(i=1;ctorlist[i]; i++)
{
p=ctorlist[i];
(*p)();
}
}
if(symRemove(sysSymTbl,"___CTOR_LIST__",stype)==ERROR)
{
printf("ctor list just diappeared! - that sucks.\n");
}
return;
}
void* __builtin_new(int sz)
{
void* p;
if(sz==0) sz=1;
p=(void*)malloc(sz);
return p;
}
void __builtin_delete (void *ptr)
{
if(ptr) free(ptr);
}
- Navigate by Date:
- Prev:
Re: watson
- Next:
Master EPICS source tree and ASCII file changes Marty Kraimer
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Tornado Steve Lewis
- Next:
Driver support for Sony-Tektronix ET-488. Noboru Yamamoto
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|