Commit 563b125d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: epl: remove INLINE mess

extern inline isn't the nicest and it doesn't really make sense.
So unwind all the INLINE defines and includes, if speed is _really_ an
issue later stuff can be put back in a sane manner.

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 54e49ddd
...@@ -104,18 +104,6 @@ ...@@ -104,18 +104,6 @@
extern "C" { extern "C" {
#endif #endif
#if (TARGET_SYSTEM == _LINUX_)
#if defined(__m68k__) // it is an big endian machine
#if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define INLINE_ENABLED TRUE
#define EPL_AMI_INLINED
#include "../EplStack/amibe.c"
#endif
#endif
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// write functions // write functions
...@@ -127,12 +115,10 @@ extern "C" { ...@@ -127,12 +115,10 @@ extern "C" {
#define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} #define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);}
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);}
#if !defined(INLINE_ENABLED)
void AmiSetWordToBe(void FAR *pAddr_p, WORD wWordVal_p); void AmiSetWordToBe(void FAR *pAddr_p, WORD wWordVal_p);
void AmiSetDwordToBe(void FAR *pAddr_p, DWORD dwDwordVal_p); void AmiSetDwordToBe(void FAR *pAddr_p, DWORD dwDwordVal_p);
void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p); void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p);
void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p); void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p);
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -145,8 +131,6 @@ void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p); ...@@ -145,8 +131,6 @@ void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p);
#define AmiGetByteFromBe(pAddr_p) (*(BYTE FAR*)(pAddr_p)) #define AmiGetByteFromBe(pAddr_p) (*(BYTE FAR*)(pAddr_p))
#define AmiGetByteFromLe(pAddr_p) (*(BYTE FAR*)(pAddr_p)) #define AmiGetByteFromLe(pAddr_p) (*(BYTE FAR*)(pAddr_p))
#if !defined(INLINE_ENABLED)
WORD AmiGetWordFromBe(void FAR *pAddr_p); WORD AmiGetWordFromBe(void FAR *pAddr_p);
DWORD AmiGetDwordFromBe(void FAR *pAddr_p); DWORD AmiGetDwordFromBe(void FAR *pAddr_p);
WORD AmiGetWordFromLe(void FAR *pAddr_p); WORD AmiGetWordFromLe(void FAR *pAddr_p);
...@@ -337,11 +321,6 @@ void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p); ...@@ -337,11 +321,6 @@ void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p); void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p);
#endif
#undef INLINE_ENABLED // disable actual inlining of functions
#define EPL_AMI_INCLUDED
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
// d.k. Linux kernel modules needs other header files for memcpy() // d.k. Linux kernel modules needs other header files for memcpy()
#if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
#include <linux/string.h> #include <linux/string.h>
#include <linux/kernel.h>
#else #else
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -102,8 +103,6 @@ ...@@ -102,8 +103,6 @@
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Configuration // Configuration
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -177,7 +176,7 @@ typedef struct { ...@@ -177,7 +176,7 @@ typedef struct {
// Get pointer to Circular Shared Buffer // Get pointer to Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p) tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -193,7 +192,7 @@ INLINE_FUNCTION tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p) ...@@ -193,7 +192,7 @@ INLINE_FUNCTION tShbCirBuff *ShbCirGetBuffer(tShbInstance pShbInstance_p)
// Get pointer to Linear Shared Buffer // Get pointer to Linear Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbLinBuff *ShbLinGetBuffer(tShbInstance pShbInstance_p) tShbLinBuff *ShbLinGetBuffer(tShbInstance pShbInstance_p)
{ {
tShbLinBuff *pShbLinBuff; tShbLinBuff *pShbLinBuff;
...@@ -210,7 +209,6 @@ int ShbCirSignalHandlerNewData(tShbInstance pShbInstance_p); ...@@ -210,7 +209,6 @@ int ShbCirSignalHandlerNewData(tShbInstance pShbInstance_p);
void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p,
unsigned int fTimeOut_p); unsigned int fTimeOut_p);
#endif
//=========================================================================// //=========================================================================//
// // // //
...@@ -218,7 +216,6 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, ...@@ -218,7 +216,6 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p,
// // // //
//=========================================================================// //=========================================================================//
#if !defined(INLINE_ENABLED)
// not inlined external functions // not inlined external functions
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -363,18 +360,13 @@ tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p) ...@@ -363,18 +360,13 @@ tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p)
} }
#endif // !defined(INLINE_ENABLED)
#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Reset Circular Shared Buffer // Reset Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p,
unsigned long ulTimeOut_p, unsigned long ulTimeOut_p,
tShbCirSigHndlrReset tShbCirSigHndlrReset pfnSignalHandlerReset_p)
pfnSignalHandlerReset_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -440,9 +432,9 @@ INLINE_FUNCTION tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, ...@@ -440,9 +432,9 @@ INLINE_FUNCTION tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p,
// Write data block to Circular Shared Buffer // Write data block to Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p,
const void *pSrcDataBlock_p, const void *pSrcDataBlock_p,
unsigned long ulDataBlockSize_p) unsigned long ulDataBlockSize_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -608,9 +600,9 @@ INLINE_FUNCTION tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p, ...@@ -608,9 +600,9 @@ INLINE_FUNCTION tShbError ShbCirWriteDataBlock(tShbInstance pShbInstance_p,
// Allocate block within the Circular Shared Buffer for chunk writing // Allocate block within the Circular Shared Buffer for chunk writing
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p,
tShbCirChunk * pShbCirChunk_p, tShbCirChunk * pShbCirChunk_p,
unsigned long ulDataBufferSize_p) unsigned long ulDataBufferSize_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -717,12 +709,11 @@ INLINE_FUNCTION tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p, ...@@ -717,12 +709,11 @@ INLINE_FUNCTION tShbError ShbCirAllocDataBlock(tShbInstance pShbInstance_p,
// Write data chunk into an allocated buffer of the Circular Shared Buffer // Write data chunk into an allocated buffer of the Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p,
tShbCirChunk * pShbCirChunk_p, tShbCirChunk *pShbCirChunk_p,
const void *pSrcDataChunk_p, const void *pSrcDataChunk_p,
unsigned long ulDataChunkSize_p, unsigned long ulDataChunkSize_p,
unsigned int unsigned int *pfBufferCompleted_p)
*pfBufferCompleted_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -857,10 +848,10 @@ INLINE_FUNCTION tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p, ...@@ -857,10 +848,10 @@ INLINE_FUNCTION tShbError ShbCirWriteDataChunk(tShbInstance pShbInstance_p,
// Read data block from Circular Shared Buffer // Read data block from Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p,
void *pDstDataBlock_p, void *pDstDataBlock_p,
unsigned long ulRdBuffSize_p, unsigned long ulRdBuffSize_p,
unsigned long *pulDataBlockSize_p) unsigned long *pulDataBlockSize_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -1009,9 +1000,8 @@ INLINE_FUNCTION tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p, ...@@ -1009,9 +1000,8 @@ INLINE_FUNCTION tShbError ShbCirReadDataBlock(tShbInstance pShbInstance_p,
// Get data size of next readable block from Circular Shared Buffer // Get data size of next readable block from Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p,
unsigned long unsigned long *pulDataBlockSize_p)
*pulDataBlockSize_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -1070,9 +1060,8 @@ INLINE_FUNCTION tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p, ...@@ -1070,9 +1060,8 @@ INLINE_FUNCTION tShbError ShbCirGetReadDataSize(tShbInstance pShbInstance_p,
// Get number of readable blocks from Circular Shared Buffer // Get number of readable blocks from Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p,
unsigned long unsigned long *pulDataBlockCount_p)
*pulDataBlockCount_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -1113,12 +1102,9 @@ INLINE_FUNCTION tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p, ...@@ -1113,12 +1102,9 @@ INLINE_FUNCTION tShbError ShbCirGetReadBlockCount(tShbInstance pShbInstance_p,
// d.k.: new parameter priority as enum // d.k.: new parameter priority as enum
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbCirSetSignalHandlerNewData(tShbInstance tShbError ShbCirSetSignalHandlerNewData(tShbInstance pShbInstance_p,
pShbInstance_p, tShbCirSigHndlrNewData pfnSignalHandlerNewData_p,
tShbCirSigHndlrNewData tShbPriority ShbPriority_p)
pfnSignalHandlerNewData_p,
tShbPriority
ShbPriority_p)
{ {
tShbCirBuff *pShbCirBuff; tShbCirBuff *pShbCirBuff;
...@@ -1165,10 +1151,6 @@ INLINE_FUNCTION tShbError ShbCirSetSignalHandlerNewData(tShbInstance ...@@ -1165,10 +1151,6 @@ INLINE_FUNCTION tShbError ShbCirSetSignalHandlerNewData(tShbInstance
} }
#endif
#if !defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// DEBUG: Trace Circular Shared Buffer // DEBUG: Trace Circular Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -1413,18 +1395,13 @@ tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p) ...@@ -1413,18 +1395,13 @@ tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p)
} }
#endif // !defined(INLINE_ENABLED)
#if (!defined(SHAREDBUFF_INLINED)) || defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Write data block to Linear Shared Buffer // Write data block to Linear Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p,
INLINE_FUNCTION tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, unsigned long ulDstBufferOffs_p,
unsigned long ulDstBufferOffs_p, const void *pSrcDataBlock_p,
const void *pSrcDataBlock_p, unsigned long ulDataBlockSize_p)
unsigned long ulDataBlockSize_p)
{ {
tShbLinBuff *pShbLinBuff; tShbLinBuff *pShbLinBuff;
...@@ -1489,11 +1466,10 @@ INLINE_FUNCTION tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, ...@@ -1489,11 +1466,10 @@ INLINE_FUNCTION tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Read data block from Linear Shared Buffer // Read data block from Linear Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p,
INLINE_FUNCTION tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, void *pDstDataBlock_p,
void *pDstDataBlock_p, unsigned long ulSrcBufferOffs_p,
unsigned long ulSrcBufferOffs_p, unsigned long ulDataBlockSize_p)
unsigned long ulDataBlockSize_p)
{ {
tShbLinBuff *pShbLinBuff; tShbLinBuff *pShbLinBuff;
...@@ -1555,10 +1531,6 @@ INLINE_FUNCTION tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p, ...@@ -1555,10 +1531,6 @@ INLINE_FUNCTION tShbError ShbLinReadDataBlock(tShbInstance pShbInstance_p,
} }
#endif
#if !defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// DEBUG: Trace Linear Shared Buffer // DEBUG: Trace Linear Shared Buffer
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -1794,6 +1766,4 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p, ...@@ -1794,6 +1766,4 @@ void ShbCirSignalHandlerReset(tShbInstance pShbInstance_p,
} }
#endif
// EOF // EOF
...@@ -110,15 +110,6 @@ typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p, ...@@ -110,15 +110,6 @@ typedef void (*tShbCirSigHndlrReset) (tShbInstance pShbInstance_p,
extern "C" { extern "C" {
#endif #endif
/*#if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define INLINE_ENABLED TRUE
#define SHAREDBUFF_INLINED
#include "SharedBuff.c"
#endif
*/
tShbError ShbInit(void); tShbError ShbInit(void);
tShbError ShbExit(void); tShbError ShbExit(void);
...@@ -129,7 +120,6 @@ extern "C" { ...@@ -129,7 +120,6 @@ extern "C" {
unsigned int *pfShbNewCreated_p); unsigned int *pfShbNewCreated_p);
tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p); tShbError ShbCirReleaseBuffer(tShbInstance pShbInstance_p);
#if !defined(INLINE_ENABLED)
tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p, tShbError ShbCirResetBuffer(tShbInstance pShbInstance_p,
unsigned long ulTimeOut_p, unsigned long ulTimeOut_p,
...@@ -159,7 +149,6 @@ extern "C" { ...@@ -159,7 +149,6 @@ extern "C" {
pfnShbSignalHandlerNewData_p, pfnShbSignalHandlerNewData_p,
tShbPriority ShbPriority_p); tShbPriority ShbPriority_p);
#endif
// Linear Shared Buffer // Linear Shared Buffer
tShbError ShbLinAllocBuffer(unsigned long ulBufferSize_p, tShbError ShbLinAllocBuffer(unsigned long ulBufferSize_p,
...@@ -168,7 +157,6 @@ extern "C" { ...@@ -168,7 +157,6 @@ extern "C" {
unsigned int *pfShbNewCreated_p); unsigned int *pfShbNewCreated_p);
tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p); tShbError ShbLinReleaseBuffer(tShbInstance pShbInstance_p);
#if !defined(INLINE_ENABLED)
tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p, tShbError ShbLinWriteDataBlock(tShbInstance pShbInstance_p,
unsigned long ulDstBufferOffs_p, unsigned long ulDstBufferOffs_p,
...@@ -179,7 +167,6 @@ extern "C" { ...@@ -179,7 +167,6 @@ extern "C" {
unsigned long ulSrcBufferOffs_p, unsigned long ulSrcBufferOffs_p,
unsigned long ulDataBlockSize_p); unsigned long ulDataBlockSize_p);
#endif
#ifndef NDEBUG #ifndef NDEBUG
tShbError ShbCirTraceBuffer(tShbInstance pShbInstance_p); tShbError ShbCirTraceBuffer(tShbInstance pShbInstance_p);
...@@ -194,10 +181,6 @@ extern "C" { ...@@ -194,10 +181,6 @@ extern "C" {
#define ShbTraceDump(p0, p1, p2, p3) #define ShbTraceDump(p0, p1, p2, p3)
#endif #endif
#undef INLINE_ENABLED // disable actual inlining of functions
#undef INLINE_FUNCTION
#define INLINE_FUNCTION // define INLINE_FUNCTION to nothing
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -79,8 +79,6 @@ ...@@ -79,8 +79,6 @@
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#if (!defined(SHBIPC_INLINED)) || defined(SHBIPC_INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Configuration // Configuration
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -211,13 +209,11 @@ static inline tShbMemHeader *ShbIpcGetShbMemHeader(tShbMemInst * pShbMemInst_p) ...@@ -211,13 +209,11 @@ static inline tShbMemHeader *ShbIpcGetShbMemHeader(tShbMemInst * pShbMemInst_p)
// not inlined internal functions // not inlined internal functions
int ShbIpcThreadSignalNewData(void *pvThreadParam_p); int ShbIpcThreadSignalNewData(void *pvThreadParam_p);
int ShbIpcThreadSignalJobReady(void *pvThreadParam_p); int ShbIpcThreadSignalJobReady(void *pvThreadParam_p);
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// modul globale vars // modul globale vars
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if !defined(SHBIPC_INLINE_ENABLED)
struct sShbMemTable *psMemTableElementFirst_g; struct sShbMemTable *psMemTableElementFirst_g;
static void *ShbIpcAllocPrivateMem(unsigned long ulMemSize_p); static void *ShbIpcAllocPrivateMem(unsigned long ulMemSize_p);
...@@ -230,7 +226,6 @@ static void ShbIpcCrc32GenTable(unsigned long aulCrcTable[256]); ...@@ -230,7 +226,6 @@ static void ShbIpcCrc32GenTable(unsigned long aulCrcTable[256]);
static unsigned long ShbIpcCrc32GetCrc(const char *pcString, static unsigned long ShbIpcCrc32GetCrc(const char *pcString,
unsigned long aulCrcTable[256]); unsigned long aulCrcTable[256]);
#endif
//=========================================================================// //=========================================================================//
// // // //
...@@ -238,7 +233,6 @@ static unsigned long ShbIpcCrc32GetCrc(const char *pcString, ...@@ -238,7 +233,6 @@ static unsigned long ShbIpcCrc32GetCrc(const char *pcString,
// // // //
//=========================================================================// //=========================================================================//
#if !defined(SHBIPC_INLINE_ENABLED)
// not inlined external functions // not inlined external functions
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -433,15 +427,11 @@ tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p) ...@@ -433,15 +427,11 @@ tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p)
return (ShbError); return (ShbError);
} }
#endif // !defined(SHBIPC_INLINE_ENABLED)
#if (!defined(SHBIPC_INLINED)) || defined(SHBIPC_INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Enter atomic section for Shared Buffer access // Enter atomic section for Shared Buffer access
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p) tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p)
{ {
tShbMemInst *pShbMemInst; tShbMemInst *pShbMemInst;
...@@ -469,7 +459,7 @@ INLINE_FUNCTION tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p) ...@@ -469,7 +459,7 @@ INLINE_FUNCTION tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p)
// Leave atomic section for Shared Buffer access // Leave atomic section for Shared Buffer access
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p) tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p)
{ {
tShbMemInst *pShbMemInst; tShbMemInst *pShbMemInst;
...@@ -496,12 +486,9 @@ INLINE_FUNCTION tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p) ...@@ -496,12 +486,9 @@ INLINE_FUNCTION tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p)
// Start signaling of new data (called from reading process) // Start signaling of new data (called from reading process)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcStartSignalingNewData(tShbInstance tShbError ShbIpcStartSignalingNewData(tShbInstance pShbInstance_p,
pShbInstance_p, tSigHndlrNewData pfnSignalHandlerNewData_p,
tSigHndlrNewData tShbPriority ShbPriority_p)
pfnSignalHandlerNewData_p,
tShbPriority
ShbPriority_p)
{ {
tShbMemInst *pShbMemInst; tShbMemInst *pShbMemInst;
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -557,8 +544,7 @@ INLINE_FUNCTION tShbError ShbIpcStartSignalingNewData(tShbInstance ...@@ -557,8 +544,7 @@ INLINE_FUNCTION tShbError ShbIpcStartSignalingNewData(tShbInstance
// Stop signaling of new data (called from reading process) // Stop signaling of new data (called from reading process)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcStopSignalingNewData(tShbInstance tShbError ShbIpcStopSignalingNewData(tShbInstance pShbInstance_p)
pShbInstance_p)
{ {
tShbMemInst *pShbMemInst; tShbMemInst *pShbMemInst;
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -604,7 +590,7 @@ INLINE_FUNCTION tShbError ShbIpcStopSignalingNewData(tShbInstance ...@@ -604,7 +590,7 @@ INLINE_FUNCTION tShbError ShbIpcStopSignalingNewData(tShbInstance
// Signal new data (called from writing process) // Signal new data (called from writing process)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p) tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p)
{ {
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -625,12 +611,9 @@ INLINE_FUNCTION tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p) ...@@ -625,12 +611,9 @@ INLINE_FUNCTION tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p)
// Start signaling for job ready (called from waiting process) // Start signaling for job ready (called from waiting process)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcStartSignalingJobReady(tShbInstance tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p,
pShbInstance_p, unsigned long ulTimeOut_p,
unsigned long tSigHndlrJobReady pfnSignalHandlerJobReady_p)
ulTimeOut_p,
tSigHndlrJobReady
pfnSignalHandlerJobReady_p)
{ {
tShbMemInst *pShbMemInst; tShbMemInst *pShbMemInst;
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -663,7 +646,7 @@ INLINE_FUNCTION tShbError ShbIpcStartSignalingJobReady(tShbInstance ...@@ -663,7 +646,7 @@ INLINE_FUNCTION tShbError ShbIpcStartSignalingJobReady(tShbInstance
// Signal job ready (called from executing process) // Signal job ready (called from executing process)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p) tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p)
{ {
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -685,7 +668,7 @@ INLINE_FUNCTION tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p) ...@@ -685,7 +668,7 @@ INLINE_FUNCTION tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p)
// Get pointer to common used share memory area // Get pointer to common used share memory area
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p) void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p)
{ {
tShbMemHeader *pShbMemHeader; tShbMemHeader *pShbMemHeader;
...@@ -703,16 +686,12 @@ INLINE_FUNCTION void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p) ...@@ -703,16 +686,12 @@ INLINE_FUNCTION void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p)
} }
#endif
//=========================================================================// //=========================================================================//
// // // //
// P R I V A T E F U N C T I O N S // // P R I V A T E F U N C T I O N S //
// // // //
//=========================================================================// //=========================================================================//
#if !defined(SHBIPC_INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Get pointer to process local information structure // Get pointer to process local information structure
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -963,4 +942,3 @@ static void ShbIpcDeleteListElement(int iBufferId) ...@@ -963,4 +942,3 @@ static void ShbIpcDeleteListElement(int iBufferId)
} }
#endif
...@@ -65,16 +65,6 @@ typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); ...@@ -65,16 +65,6 @@ typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p);
typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p,
unsigned int fTimeOut_p); unsigned int fTimeOut_p);
#if (TARGET_SYSTEM == _LINUX_)
#if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define SHBIPC_INLINE_ENABLED TRUE
#define SHBIPC_INLINED
#include "ShbIpc-LinuxKernel.c"
#endif
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Prototypes // Prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -88,8 +78,6 @@ tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p, ...@@ -88,8 +78,6 @@ tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p,
unsigned int *pfShbNewCreated_p); unsigned int *pfShbNewCreated_p);
tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p); tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p);
#if !defined(SHBIPC_INLINE_ENABLED)
tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p); tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p);
tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p); tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p);
...@@ -107,10 +95,5 @@ tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p, ...@@ -107,10 +95,5 @@ tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p,
tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p); tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p);
void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p); void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p);
#endif
#undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions
#undef INLINE_FUNCTION
#define INLINE_FUNCTION // define INLINE_FUNCTION to nothing
#endif // #ifndef _SHBIPC_H_ #endif // #ifndef _SHBIPC_H_
...@@ -74,8 +74,6 @@ ...@@ -74,8 +74,6 @@
//#include "EplAmi.h" //#include "EplAmi.h"
#include "EplInc.h" #include "EplInc.h"
#if (!defined(EPL_AMI_INLINED)) || defined(INLINE_ENABLED)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -129,7 +127,7 @@ void AmiSetByteToBe (void FAR* pAddr_p, BYTE bByteVal_p) ...@@ -129,7 +127,7 @@ void AmiSetByteToBe (void FAR* pAddr_p, BYTE bByteVal_p)
//------------< write WORD in big endian >-------------------------- //------------< write WORD in big endian >--------------------------
INLINE_FUNCTION void AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p) void AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p)
{ {
twStruct FAR *pwStruct; twStruct FAR *pwStruct;
twStruct wValue; twStruct wValue;
...@@ -144,7 +142,7 @@ INLINE_FUNCTION void AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p) ...@@ -144,7 +142,7 @@ INLINE_FUNCTION void AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p)
//------------< write DWORD in big endian >------------------------- //------------< write DWORD in big endian >-------------------------
INLINE_FUNCTION void AmiSetDwordToBe(void FAR *pAddr_p, DWORD dwDwordVal_p) void AmiSetDwordToBe(void FAR *pAddr_p, DWORD dwDwordVal_p)
{ {
tdwStruct FAR *pdwStruct; tdwStruct FAR *pdwStruct;
tdwStruct dwValue; tdwStruct dwValue;
...@@ -187,7 +185,7 @@ void AmiSetByteToLe (void FAR* pAddr_p, BYTE bByteVal_p) ...@@ -187,7 +185,7 @@ void AmiSetByteToLe (void FAR* pAddr_p, BYTE bByteVal_p)
//------------< write WORD in little endian >-------------------------- //------------< write WORD in little endian >--------------------------
INLINE_FUNCTION void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p) void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p)
{ {
twStruct FAR *pwStruct; twStruct FAR *pwStruct;
...@@ -198,7 +196,7 @@ INLINE_FUNCTION void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p) ...@@ -198,7 +196,7 @@ INLINE_FUNCTION void AmiSetWordToLe(void FAR *pAddr_p, WORD wWordVal_p)
//------------< write DWORD in little endian >------------------------- //------------< write DWORD in little endian >-------------------------
INLINE_FUNCTION void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p) void AmiSetDwordToLe(void FAR *pAddr_p, DWORD dwDwordVal_p)
{ {
tdwStruct FAR *pdwStruct; tdwStruct FAR *pdwStruct;
...@@ -234,7 +232,7 @@ BYTE AmiGetByteFromBe (void FAR* pAddr_p) ...@@ -234,7 +232,7 @@ BYTE AmiGetByteFromBe (void FAR* pAddr_p)
//------------< read WORD in big endian >--------------------------- //------------< read WORD in big endian >---------------------------
INLINE_FUNCTION WORD AmiGetWordFromBe(void FAR *pAddr_p) WORD AmiGetWordFromBe(void FAR *pAddr_p)
{ {
twStruct FAR *pwStruct; twStruct FAR *pwStruct;
twStruct wValue; twStruct wValue;
...@@ -250,7 +248,7 @@ INLINE_FUNCTION WORD AmiGetWordFromBe(void FAR *pAddr_p) ...@@ -250,7 +248,7 @@ INLINE_FUNCTION WORD AmiGetWordFromBe(void FAR *pAddr_p)
//------------< read DWORD in big endian >-------------------------- //------------< read DWORD in big endian >--------------------------
INLINE_FUNCTION DWORD AmiGetDwordFromBe(void FAR *pAddr_p) DWORD AmiGetDwordFromBe(void FAR *pAddr_p)
{ {
tdwStruct FAR *pdwStruct; tdwStruct FAR *pdwStruct;
tdwStruct dwValue; tdwStruct dwValue;
...@@ -293,7 +291,7 @@ BYTE AmiGetByteFromLe (void FAR* pAddr_p) ...@@ -293,7 +291,7 @@ BYTE AmiGetByteFromLe (void FAR* pAddr_p)
//------------< read WORD in little endian >--------------------------- //------------< read WORD in little endian >---------------------------
INLINE_FUNCTION WORD AmiGetWordFromLe(void FAR *pAddr_p) WORD AmiGetWordFromLe(void FAR *pAddr_p)
{ {
twStruct FAR *pwStruct; twStruct FAR *pwStruct;
...@@ -303,7 +301,7 @@ INLINE_FUNCTION WORD AmiGetWordFromLe(void FAR *pAddr_p) ...@@ -303,7 +301,7 @@ INLINE_FUNCTION WORD AmiGetWordFromLe(void FAR *pAddr_p)
//------------< read DWORD in little endian >-------------------------- //------------< read DWORD in little endian >--------------------------
INLINE_FUNCTION DWORD AmiGetDwordFromLe(void FAR *pAddr_p) DWORD AmiGetDwordFromLe(void FAR *pAddr_p)
{ {
tdwStruct FAR *pdwStruct; tdwStruct FAR *pdwStruct;
...@@ -326,7 +324,7 @@ INLINE_FUNCTION DWORD AmiGetDwordFromLe(void FAR *pAddr_p) ...@@ -326,7 +324,7 @@ INLINE_FUNCTION DWORD AmiGetDwordFromLe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetDword24ToBe(void FAR *pAddr_p, DWORD dwDwordVal_p) void AmiSetDword24ToBe(void FAR *pAddr_p, DWORD dwDwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & dwDwordVal_p)[2]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & dwDwordVal_p)[2];
((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & dwDwordVal_p)[1]; ((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & dwDwordVal_p)[1];
...@@ -348,7 +346,7 @@ INLINE_FUNCTION void AmiSetDword24ToBe(void FAR *pAddr_p, DWORD dwDwordVal_p) ...@@ -348,7 +346,7 @@ INLINE_FUNCTION void AmiSetDword24ToBe(void FAR *pAddr_p, DWORD dwDwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetDword24ToLe(void FAR *pAddr_p, DWORD dwDwordVal_p) void AmiSetDword24ToLe(void FAR *pAddr_p, DWORD dwDwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & dwDwordVal_p)[0]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & dwDwordVal_p)[0];
((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & dwDwordVal_p)[1]; ((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & dwDwordVal_p)[1];
...@@ -368,7 +366,7 @@ INLINE_FUNCTION void AmiSetDword24ToLe(void FAR *pAddr_p, DWORD dwDwordVal_p) ...@@ -368,7 +366,7 @@ INLINE_FUNCTION void AmiSetDword24ToLe(void FAR *pAddr_p, DWORD dwDwordVal_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION DWORD AmiGetDword24FromBe(void FAR *pAddr_p) DWORD AmiGetDword24FromBe(void FAR *pAddr_p)
{ {
tdwStruct dwStruct; tdwStruct dwStruct;
...@@ -391,7 +389,7 @@ INLINE_FUNCTION DWORD AmiGetDword24FromBe(void FAR *pAddr_p) ...@@ -391,7 +389,7 @@ INLINE_FUNCTION DWORD AmiGetDword24FromBe(void FAR *pAddr_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION DWORD AmiGetDword24FromLe(void FAR *pAddr_p) DWORD AmiGetDword24FromLe(void FAR *pAddr_p)
{ {
tdwStruct dwStruct; tdwStruct dwStruct;
...@@ -417,7 +415,7 @@ INLINE_FUNCTION DWORD AmiGetDword24FromLe(void FAR *pAddr_p) ...@@ -417,7 +415,7 @@ INLINE_FUNCTION DWORD AmiGetDword24FromLe(void FAR *pAddr_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword64ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword64ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[7]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[7];
((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & qwQwordVal_p)[6]; ((BYTE FAR *) pAddr_p)[1] = ((BYTE FAR *) & qwQwordVal_p)[6];
...@@ -443,7 +441,7 @@ INLINE_FUNCTION void AmiSetQword64ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -443,7 +441,7 @@ INLINE_FUNCTION void AmiSetQword64ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword64ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword64ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
QWORD FAR *pqwDst; QWORD FAR *pqwDst;
...@@ -464,7 +462,7 @@ INLINE_FUNCTION void AmiSetQword64ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -464,7 +462,7 @@ INLINE_FUNCTION void AmiSetQword64ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword64FromBe(void FAR *pAddr_p) QWORD AmiGetQword64FromBe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -493,7 +491,7 @@ INLINE_FUNCTION QWORD AmiGetQword64FromBe(void FAR *pAddr_p) ...@@ -493,7 +491,7 @@ INLINE_FUNCTION QWORD AmiGetQword64FromBe(void FAR *pAddr_p)
// State: not tested // State: not tested
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword64FromLe(void FAR *pAddr_p) QWORD AmiGetQword64FromLe(void FAR *pAddr_p)
{ {
tqwStruct FAR *pqwStruct; tqwStruct FAR *pqwStruct;
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -519,7 +517,7 @@ INLINE_FUNCTION QWORD AmiGetQword64FromLe(void FAR *pAddr_p) ...@@ -519,7 +517,7 @@ INLINE_FUNCTION QWORD AmiGetQword64FromLe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword40ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword40ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[4]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[4];
...@@ -545,7 +543,7 @@ INLINE_FUNCTION void AmiSetQword40ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -545,7 +543,7 @@ INLINE_FUNCTION void AmiSetQword40ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword40ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword40ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0]; ((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0];
...@@ -567,7 +565,7 @@ INLINE_FUNCTION void AmiSetQword40ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -567,7 +565,7 @@ INLINE_FUNCTION void AmiSetQword40ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword40FromBe(void FAR *pAddr_p) QWORD AmiGetQword40FromBe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -593,7 +591,7 @@ INLINE_FUNCTION QWORD AmiGetQword40FromBe(void FAR *pAddr_p) ...@@ -593,7 +591,7 @@ INLINE_FUNCTION QWORD AmiGetQword40FromBe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword40FromLe(void FAR *pAddr_p) QWORD AmiGetQword40FromLe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -620,7 +618,7 @@ INLINE_FUNCTION QWORD AmiGetQword40FromLe(void FAR *pAddr_p) ...@@ -620,7 +618,7 @@ INLINE_FUNCTION QWORD AmiGetQword40FromLe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword48ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword48ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[5]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[5];
...@@ -647,7 +645,7 @@ INLINE_FUNCTION void AmiSetQword48ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -647,7 +645,7 @@ INLINE_FUNCTION void AmiSetQword48ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword48ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword48ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0]; ((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0];
...@@ -669,7 +667,7 @@ INLINE_FUNCTION void AmiSetQword48ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -669,7 +667,7 @@ INLINE_FUNCTION void AmiSetQword48ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword48FromBe(void FAR *pAddr_p) QWORD AmiGetQword48FromBe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -695,7 +693,7 @@ INLINE_FUNCTION QWORD AmiGetQword48FromBe(void FAR *pAddr_p) ...@@ -695,7 +693,7 @@ INLINE_FUNCTION QWORD AmiGetQword48FromBe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword48FromLe(void FAR *pAddr_p) QWORD AmiGetQword48FromLe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -722,7 +720,7 @@ INLINE_FUNCTION QWORD AmiGetQword48FromLe(void FAR *pAddr_p) ...@@ -722,7 +720,7 @@ INLINE_FUNCTION QWORD AmiGetQword48FromLe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword56ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword56ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[6]; ((BYTE FAR *) pAddr_p)[0] = ((BYTE FAR *) & qwQwordVal_p)[6];
...@@ -750,7 +748,7 @@ INLINE_FUNCTION void AmiSetQword56ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -750,7 +748,7 @@ INLINE_FUNCTION void AmiSetQword56ToBe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetQword56ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword56ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
{ {
((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0]; ((DWORD FAR *) pAddr_p)[0] = ((DWORD FAR *) & qwQwordVal_p)[0];
...@@ -773,7 +771,7 @@ INLINE_FUNCTION void AmiSetQword56ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p) ...@@ -773,7 +771,7 @@ INLINE_FUNCTION void AmiSetQword56ToLe(void FAR *pAddr_p, QWORD qwQwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword56FromBe(void FAR *pAddr_p) QWORD AmiGetQword56FromBe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -799,7 +797,7 @@ INLINE_FUNCTION QWORD AmiGetQword56FromBe(void FAR *pAddr_p) ...@@ -799,7 +797,7 @@ INLINE_FUNCTION QWORD AmiGetQword56FromBe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION QWORD AmiGetQword56FromLe(void FAR *pAddr_p) QWORD AmiGetQword56FromLe(void FAR *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
...@@ -826,7 +824,7 @@ INLINE_FUNCTION QWORD AmiGetQword56FromLe(void FAR *pAddr_p) ...@@ -826,7 +824,7 @@ INLINE_FUNCTION QWORD AmiGetQword56FromLe(void FAR *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p) void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p)
{ {
AmiSetDwordToLe(((BYTE FAR *) pAddr_p), AmiSetDwordToLe(((BYTE FAR *) pAddr_p),
...@@ -850,7 +848,7 @@ INLINE_FUNCTION void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfD ...@@ -850,7 +848,7 @@ INLINE_FUNCTION void AmiSetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfD
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
INLINE_FUNCTION void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p) void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfDay_p)
{ {
pTimeOfDay_p->m_dwMs = pTimeOfDay_p->m_dwMs =
...@@ -859,8 +857,6 @@ INLINE_FUNCTION void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfD ...@@ -859,8 +857,6 @@ INLINE_FUNCTION void AmiGetTimeOfDay(void FAR *pAddr_p, tTimeOfDay FAR *pTimeOfD
} }
#endif
// EOF // EOF
// Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler // Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler
......
...@@ -127,24 +127,11 @@ ...@@ -127,24 +127,11 @@
// definitions for function inlining // definitions for function inlining
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#define INLINE_FUNCTION // empty define
#undef INLINE_ENABLED // disable actual inlining of functions
#undef INLINE_FUNCTION_DEF // disable inlining for all compilers per default
#define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems #define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems
// r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions:
// LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx).
// But Linux for PC does not need the definitions for embedded Linux. // But Linux for PC does not need the definitions for embedded Linux.
// GNU C compiler supports function inlining
#define INLINE_FUNCTION_DEF extern inline
// to actually enable inlining just include the following three lines
// #undef INLINE_FUNCTION
// #define INLINE_FUNCTION INLINE_FUNCTION_DEF
// #define INLINE_ENABLED TRUE
#define TARGET_SYSTEM _LINUX_ // Linux definition #define TARGET_SYSTEM _LINUX_ // Linux definition
#define DEV_SYSTEM _DEV_LINUX_ #define DEV_SYSTEM _DEV_LINUX_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment