Add some routines to make porting from vxWorks a little easier.
I'm a little leery about my quick hack for rebootHookAdd() since the argument to the 'hooked' function is different.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#define INCdevLibh 1
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <osdVME.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -423,6 +424,11 @@ long devDisableInterruptLevel (epicsInterruptType intType, unsigned level);
|
||||
*/
|
||||
long locationProbe (epicsAddressType addrType, char *pLocation);
|
||||
|
||||
/*
|
||||
* Some vxWorks convenience routines
|
||||
*/
|
||||
void bcopyLongs(char *source, char *destination, int nlongs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <epicsStdio.h>
|
||||
#include <epicsExit.h>
|
||||
|
||||
#if defined(__PPC__) && defined(mpc750)
|
||||
#if defined(__PPC__) /* && defined(mpc750) */
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
@@ -322,3 +324,21 @@ void unsolicitedHandlerEPICS(int vectorNumber)
|
||||
}
|
||||
|
||||
#endif /* defined(__PPC__) && defined(mpc750) */
|
||||
|
||||
/*
|
||||
* Some vxWorks convenience routines
|
||||
*/
|
||||
void
|
||||
bcopyLongs(char *source, char *destination, int nlongs)
|
||||
{
|
||||
const long *s = (long *)source;
|
||||
long *d = (long *)destination;
|
||||
while(nlongs--)
|
||||
*d++ = *s++;
|
||||
}
|
||||
|
||||
void
|
||||
rebootHookAdd(void (*funptr)())
|
||||
{
|
||||
epicsAtExit(funptr,NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user