diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-23 13:54:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 17:54:20 -0400 |
commit | 54e49dddd0983a1f4612e1843a2b193940a4e985 (patch) | |
tree | 5bde3d63214e86ae72d5a9eaa08d83dadea02ca6 | |
parent | d10f46992fb59de804550999806e1e0c0aa335a8 (diff) |
Staging: epl: remove _WIN_32_ and _NO_OS_ defines
They are not used.
Also remove the code that was looking for them.
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/epl/Benchmark.h | 5 | ||||
-rw-r--r-- | drivers/staging/epl/Debug.h | 21 | ||||
-rw-r--r-- | drivers/staging/epl/EplAmi.h | 11 | ||||
-rw-r--r-- | drivers/staging/epl/EplSdoUdpu.c | 128 | ||||
-rw-r--r-- | drivers/staging/epl/EplTarget.h | 79 | ||||
-rw-r--r-- | drivers/staging/epl/ShbIpc.h | 11 | ||||
-rw-r--r-- | drivers/staging/epl/global.h | 2 |
7 files changed, 10 insertions, 247 deletions
diff --git a/drivers/staging/epl/Benchmark.h b/drivers/staging/epl/Benchmark.h index 62dee3b14373..634600fff320 100644 --- a/drivers/staging/epl/Benchmark.h +++ b/drivers/staging/epl/Benchmark.h | |||
@@ -73,10 +73,7 @@ | |||
73 | 73 | ||
74 | #include "global.h" | 74 | #include "global.h" |
75 | 75 | ||
76 | #if (TARGET_SYSTEM == _NO_OS_) && (DEV_SYSTEM == _DEV_GNU_CF548X_) | 76 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
77 | #include "common.h" | ||
78 | |||
79 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
80 | 77 | ||
81 | // #include <linux/config.h> | 78 | // #include <linux/config.h> |
82 | #include <linux/kernel.h> | 79 | #include <linux/kernel.h> |
diff --git a/drivers/staging/epl/Debug.h b/drivers/staging/epl/Debug.h index 05de9d541fd6..2761606b6887 100644 --- a/drivers/staging/epl/Debug.h +++ b/drivers/staging/epl/Debug.h | |||
@@ -163,25 +163,6 @@ | |||
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | //--------------------------------------------------------------------------- | 165 | //--------------------------------------------------------------------------- |
166 | #if (DEV_SYSTEM == _DEV_WIN32_) && defined (TRACE_MSG) | ||
167 | |||
168 | // For WIN32 the macro DEBUG_TRACE0 can be defined as function call TraceLvl() | ||
169 | // or as macro TRACE(). | ||
170 | // | ||
171 | // Here the parameter 'lvl' can be used with more than one | ||
172 | // debug-level (using OR). | ||
173 | // | ||
174 | // Example: DEBUG_TRACE1(DEBUG_LVL_30 | DEBUG_LVL_02, "Hello %d", bCount); | ||
175 | |||
176 | #define DEBUG_TRACE0(lvl,str) TraceLvl((lvl),str) | ||
177 | #define DEBUG_TRACE1(lvl,str,p1) TraceLvl((lvl),str,p1) | ||
178 | #define DEBUG_TRACE2(lvl,str,p1,p2) TraceLvl((lvl),str,p1,p2) | ||
179 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) TraceLvl((lvl),str,p1,p2,p3) | ||
180 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) TraceLvl((lvl),str,p1,p2,p3,p4) | ||
181 | #define DEBUG_GLB_LVL() dwDebugLevel_g | ||
182 | |||
183 | #else | ||
184 | |||
185 | // At microcontrollers we do reduce the memory usage by deleting DEBUG_TRACE-lines | 166 | // At microcontrollers we do reduce the memory usage by deleting DEBUG_TRACE-lines |
186 | // (compiler does delete the lines). | 167 | // (compiler does delete the lines). |
187 | // | 168 | // |
@@ -643,8 +624,6 @@ | |||
643 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) | 624 | #define DEBUG_TRACE3(lvl,str,p1,p2,p3) lvl##_TRACE3(str,p1,p2,p3) |
644 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) | 625 | #define DEBUG_TRACE4(lvl,str,p1,p2,p3,p4) lvl##_TRACE4(str,p1,p2,p3,p4) |
645 | 626 | ||
646 | #endif | ||
647 | |||
648 | //--------------------------------------------------------------------------- | 627 | //--------------------------------------------------------------------------- |
649 | // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump | 628 | // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump |
650 | // out data bytes. Function DumpData() has to be included. | 629 | // out data bytes. Function DumpData() has to be included. |
diff --git a/drivers/staging/epl/EplAmi.h b/drivers/staging/epl/EplAmi.h index 04aeed68f4cb..04ceda43a915 100644 --- a/drivers/staging/epl/EplAmi.h +++ b/drivers/staging/epl/EplAmi.h | |||
@@ -104,16 +104,7 @@ | |||
104 | extern "C" { | 104 | extern "C" { |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #if (TARGET_SYSTEM == _WIN32_) | 107 | #if (TARGET_SYSTEM == _LINUX_) |
108 | #if defined(INLINE_FUNCTION_DEF) | ||
109 | #undef INLINE_FUNCTION | ||
110 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | ||
111 | #define INLINE_ENABLED TRUE | ||
112 | #define EPL_AMI_INLINED | ||
113 | #include "../EplStack/amix86.c" | ||
114 | #endif | ||
115 | |||
116 | #elif (TARGET_SYSTEM == _LINUX_) | ||
117 | #if defined(__m68k__) // it is an big endian machine | 108 | #if defined(__m68k__) // it is an big endian machine |
118 | #if defined(INLINE_FUNCTION_DEF) | 109 | #if defined(INLINE_FUNCTION_DEF) |
119 | #undef INLINE_FUNCTION | 110 | #undef INLINE_FUNCTION |
diff --git a/drivers/staging/epl/EplSdoUdpu.c b/drivers/staging/epl/EplSdoUdpu.c index 74fe25968e29..c6397df90455 100644 --- a/drivers/staging/epl/EplSdoUdpu.c +++ b/drivers/staging/epl/EplSdoUdpu.c | |||
@@ -110,12 +110,7 @@ typedef struct { | |||
110 | tEplSequLayerReceiveCb m_fpSdoAsySeqCb; | 110 | tEplSequLayerReceiveCb m_fpSdoAsySeqCb; |
111 | SOCKET m_UdpSocket; | 111 | SOCKET m_UdpSocket; |
112 | 112 | ||
113 | #if (TARGET_SYSTEM == _WIN32_) | 113 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
114 | HANDLE m_ThreadHandle; | ||
115 | LPCRITICAL_SECTION m_pCriticalSection; | ||
116 | CRITICAL_SECTION m_CriticalSection; | ||
117 | |||
118 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
119 | struct completion m_CompletionUdpThread; | 114 | struct completion m_CompletionUdpThread; |
120 | int m_ThreadHandle; | 115 | int m_ThreadHandle; |
121 | int m_iTerminateThread; | 116 | int m_iTerminateThread; |
@@ -133,10 +128,7 @@ static tEplSdoUdpInstance SdoUdpInstance_g; | |||
133 | // local function prototypes | 128 | // local function prototypes |
134 | //--------------------------------------------------------------------------- | 129 | //--------------------------------------------------------------------------- |
135 | 130 | ||
136 | #if (TARGET_SYSTEM == _WIN32_) | 131 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
137 | static DWORD EplSdoUdpThread(LPVOID lpParameter); | ||
138 | |||
139 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
140 | static int EplSdoUdpThread(void *pArg_p); | 132 | static int EplSdoUdpThread(void *pArg_p); |
141 | #endif | 133 | #endif |
142 | 134 | ||
@@ -209,12 +201,6 @@ tEplKernel EplSdoUdpuAddInstance(tEplSequLayerReceiveCb fpReceiveCb_p) | |||
209 | { | 201 | { |
210 | tEplKernel Ret; | 202 | tEplKernel Ret; |
211 | 203 | ||
212 | #if (TARGET_SYSTEM == _WIN32_) | ||
213 | int iError; | ||
214 | WSADATA Wsa; | ||
215 | |||
216 | #endif | ||
217 | |||
218 | // set instance variables to 0 | 204 | // set instance variables to 0 |
219 | EPL_MEMSET(&SdoUdpInstance_g, 0x00, sizeof(SdoUdpInstance_g)); | 205 | EPL_MEMSET(&SdoUdpInstance_g, 0x00, sizeof(SdoUdpInstance_g)); |
220 | 206 | ||
@@ -228,20 +214,7 @@ tEplKernel EplSdoUdpuAddInstance(tEplSequLayerReceiveCb fpReceiveCb_p) | |||
228 | goto Exit; | 214 | goto Exit; |
229 | } | 215 | } |
230 | 216 | ||
231 | #if (TARGET_SYSTEM == _WIN32_) | 217 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
232 | // start winsock2 for win32 | ||
233 | // windows specific start of socket | ||
234 | iError = WSAStartup(MAKEWORD(2, 0), &Wsa); | ||
235 | if (iError != 0) { | ||
236 | Ret = kEplSdoUdpNoSocket; | ||
237 | goto Exit; | ||
238 | } | ||
239 | // create critical section for acccess of instnace variables | ||
240 | SdoUdpInstance_g.m_pCriticalSection = | ||
241 | &SdoUdpInstance_g.m_CriticalSection; | ||
242 | InitializeCriticalSection(SdoUdpInstance_g.m_pCriticalSection); | ||
243 | |||
244 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
245 | init_completion(&SdoUdpInstance_g.m_CompletionUdpThread); | 218 | init_completion(&SdoUdpInstance_g.m_CompletionUdpThread); |
246 | SdoUdpInstance_g.m_iTerminateThread = 0; | 219 | SdoUdpInstance_g.m_iTerminateThread = 0; |
247 | #endif | 220 | #endif |
@@ -277,22 +250,11 @@ tEplKernel EplSdoUdpuDelInstance(void) | |||
277 | { | 250 | { |
278 | tEplKernel Ret; | 251 | tEplKernel Ret; |
279 | 252 | ||
280 | #if (TARGET_SYSTEM == _WIN32_) | ||
281 | BOOL fTermError; | ||
282 | #endif | ||
283 | |||
284 | Ret = kEplSuccessful; | 253 | Ret = kEplSuccessful; |
285 | 254 | ||
286 | if (SdoUdpInstance_g.m_ThreadHandle != 0) { // listen thread was started | 255 | if (SdoUdpInstance_g.m_ThreadHandle != 0) { // listen thread was started |
287 | // close thread | 256 | // close thread |
288 | #if (TARGET_SYSTEM == _WIN32_) | 257 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
289 | fTermError = | ||
290 | TerminateThread(SdoUdpInstance_g.m_ThreadHandle, 0); | ||
291 | if (fTermError == FALSE) { | ||
292 | Ret = kEplSdoUdpThreadError; | ||
293 | goto Exit; | ||
294 | } | ||
295 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
296 | SdoUdpInstance_g.m_iTerminateThread = 1; | 258 | SdoUdpInstance_g.m_iTerminateThread = 1; |
297 | /* kill_proc(SdoUdpInstance_g.m_ThreadHandle, SIGTERM, 1 ); */ | 259 | /* kill_proc(SdoUdpInstance_g.m_ThreadHandle, SIGTERM, 1 ); */ |
298 | send_sig(SIGTERM, SdoUdpInstance_g.m_ThreadHandle, 1); | 260 | send_sig(SIGTERM, SdoUdpInstance_g.m_ThreadHandle, 1); |
@@ -307,19 +269,6 @@ tEplKernel EplSdoUdpuDelInstance(void) | |||
307 | closesocket(SdoUdpInstance_g.m_UdpSocket); | 269 | closesocket(SdoUdpInstance_g.m_UdpSocket); |
308 | SdoUdpInstance_g.m_UdpSocket = INVALID_SOCKET; | 270 | SdoUdpInstance_g.m_UdpSocket = INVALID_SOCKET; |
309 | } | 271 | } |
310 | #if (TARGET_SYSTEM == _WIN32_) | ||
311 | // delete critical section | ||
312 | DeleteCriticalSection(SdoUdpInstance_g.m_pCriticalSection); | ||
313 | #endif | ||
314 | |||
315 | #if (TARGET_SYSTEM == _WIN32_) | ||
316 | // for win 32 | ||
317 | WSACleanup(); | ||
318 | #endif | ||
319 | |||
320 | #if (TARGET_SYSTEM == _WIN32_) | ||
321 | Exit: | ||
322 | #endif | ||
323 | return Ret; | 272 | return Ret; |
324 | } | 273 | } |
325 | 274 | ||
@@ -346,11 +295,6 @@ tEplKernel EplSdoUdpuConfig(unsigned long ulIpAddr_p, unsigned int uiPort_p) | |||
346 | struct sockaddr_in Addr; | 295 | struct sockaddr_in Addr; |
347 | int iError; | 296 | int iError; |
348 | 297 | ||
349 | #if (TARGET_SYSTEM == _WIN32_) | ||
350 | BOOL fTermError; | ||
351 | unsigned long ulThreadId; | ||
352 | #endif | ||
353 | |||
354 | Ret = kEplSuccessful; | 298 | Ret = kEplSuccessful; |
355 | 299 | ||
356 | if (uiPort_p == 0) { // set UDP port to default port number | 300 | if (uiPort_p == 0) { // set UDP port to default port number |
@@ -363,14 +307,7 @@ tEplKernel EplSdoUdpuConfig(unsigned long ulIpAddr_p, unsigned int uiPort_p) | |||
363 | if (SdoUdpInstance_g.m_ThreadHandle != 0) { // listen thread was started | 307 | if (SdoUdpInstance_g.m_ThreadHandle != 0) { // listen thread was started |
364 | 308 | ||
365 | // close old thread | 309 | // close old thread |
366 | #if (TARGET_SYSTEM == _WIN32_) | 310 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
367 | fTermError = | ||
368 | TerminateThread(SdoUdpInstance_g.m_ThreadHandle, 0); | ||
369 | if (fTermError == FALSE) { | ||
370 | Ret = kEplSdoUdpThreadError; | ||
371 | goto Exit; | ||
372 | } | ||
373 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
374 | SdoUdpInstance_g.m_iTerminateThread = 1; | 311 | SdoUdpInstance_g.m_iTerminateThread = 1; |
375 | /* kill_proc(SdoUdpInstance_g.m_ThreadHandle, SIGTERM, 1 ); */ | 312 | /* kill_proc(SdoUdpInstance_g.m_ThreadHandle, SIGTERM, 1 ); */ |
376 | send_sig(SIGTERM, SdoUdpInstance_g.m_ThreadHandle, 1); | 313 | send_sig(SIGTERM, SdoUdpInstance_g.m_ThreadHandle, 1); |
@@ -412,20 +349,7 @@ tEplKernel EplSdoUdpuConfig(unsigned long ulIpAddr_p, unsigned int uiPort_p) | |||
412 | goto Exit; | 349 | goto Exit; |
413 | } | 350 | } |
414 | // create Listen-Thread | 351 | // create Listen-Thread |
415 | #if (TARGET_SYSTEM == _WIN32_) | 352 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
416 | // for win32 | ||
417 | |||
418 | // create thread | ||
419 | SdoUdpInstance_g.m_ThreadHandle = CreateThread(NULL, | ||
420 | 0, | ||
421 | EplSdoUdpThread, | ||
422 | &SdoUdpInstance_g, | ||
423 | 0, &ulThreadId); | ||
424 | if (SdoUdpInstance_g.m_ThreadHandle == NULL) { | ||
425 | Ret = kEplSdoUdpThreadError; | ||
426 | goto Exit; | ||
427 | } | ||
428 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
429 | 353 | ||
430 | SdoUdpInstance_g.m_ThreadHandle = | 354 | SdoUdpInstance_g.m_ThreadHandle = |
431 | kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g, CLONE_KERNEL); | 355 | kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g, CLONE_KERNEL); |
@@ -552,22 +476,12 @@ tEplKernel EplSdoUdpuSendData(tEplSdoConHdl SdoConHandle_p, | |||
552 | 476 | ||
553 | // call sendto | 477 | // call sendto |
554 | Addr.sin_family = AF_INET; | 478 | Addr.sin_family = AF_INET; |
555 | #if (TARGET_SYSTEM == _WIN32_) | ||
556 | // enter critical section for process function | ||
557 | EnterCriticalSection(SdoUdpInstance_g.m_pCriticalSection); | ||
558 | #endif | ||
559 | |||
560 | Addr.sin_port = | 479 | Addr.sin_port = |
561 | (unsigned short)SdoUdpInstance_g.m_aSdoAbsUdpConnection[uiArray]. | 480 | (unsigned short)SdoUdpInstance_g.m_aSdoAbsUdpConnection[uiArray]. |
562 | m_uiPort; | 481 | m_uiPort; |
563 | Addr.sin_addr.s_addr = | 482 | Addr.sin_addr.s_addr = |
564 | SdoUdpInstance_g.m_aSdoAbsUdpConnection[uiArray].m_ulIpAddr; | 483 | SdoUdpInstance_g.m_aSdoAbsUdpConnection[uiArray].m_ulIpAddr; |
565 | 484 | ||
566 | #if (TARGET_SYSTEM == _WIN32_) | ||
567 | // leave critical section for process function | ||
568 | LeaveCriticalSection(SdoUdpInstance_g.m_pCriticalSection); | ||
569 | #endif | ||
570 | |||
571 | iError = sendto(SdoUdpInstance_g.m_UdpSocket, // sockethandle | 485 | iError = sendto(SdoUdpInstance_g.m_UdpSocket, // sockethandle |
572 | (const char *)&pSrcData_p->m_le_bMessageType, // data to send | 486 | (const char *)&pSrcData_p->m_le_bMessageType, // data to send |
573 | dwDataSize_p, // number of bytes to send | 487 | dwDataSize_p, // number of bytes to send |
@@ -647,11 +561,7 @@ tEplKernel EplSdoUdpuDelCon(tEplSdoConHdl SdoConHandle_p) | |||
647 | // State: | 561 | // State: |
648 | // | 562 | // |
649 | //--------------------------------------------------------------------------- | 563 | //--------------------------------------------------------------------------- |
650 | #if (TARGET_SYSTEM == _WIN32_) | ||
651 | static DWORD EplSdoUdpThread(LPVOID lpParameter) | ||
652 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
653 | static int EplSdoUdpThread(void *pArg_p) | 564 | static int EplSdoUdpThread(void *pArg_p) |
654 | #endif | ||
655 | { | 565 | { |
656 | 566 | ||
657 | tEplSdoUdpInstance *pInstance; | 567 | tEplSdoUdpInstance *pInstance; |
@@ -663,11 +573,7 @@ static int EplSdoUdpThread(void *pArg_p) | |||
663 | unsigned int uiSize; | 573 | unsigned int uiSize; |
664 | tEplSdoConHdl SdoConHdl; | 574 | tEplSdoConHdl SdoConHdl; |
665 | 575 | ||
666 | #if (TARGET_SYSTEM == _WIN32_) | 576 | #if (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) |
667 | pInstance = (tEplSdoUdpInstance *) lpParameter; | ||
668 | |||
669 | for (;;) | ||
670 | #elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__) | ||
671 | pInstance = (tEplSdoUdpInstance *) pArg_p; | 577 | pInstance = (tEplSdoUdpInstance *) pArg_p; |
672 | daemonize("EplSdoUdpThread"); | 578 | daemonize("EplSdoUdpThread"); |
673 | allow_signal(SIGTERM); | 579 | allow_signal(SIGTERM); |
@@ -693,11 +599,6 @@ static int EplSdoUdpThread(void *pArg_p) | |||
693 | // get handle for higher layer | 599 | // get handle for higher layer |
694 | iCount = 0; | 600 | iCount = 0; |
695 | iFreeEntry = 0xFFFF; | 601 | iFreeEntry = 0xFFFF; |
696 | #if (TARGET_SYSTEM == _WIN32_) | ||
697 | // enter critical section for process function | ||
698 | EnterCriticalSection(SdoUdpInstance_g. | ||
699 | m_pCriticalSection); | ||
700 | #endif | ||
701 | while (iCount < EPL_SDO_MAX_CONNECTION_UDP) { | 602 | while (iCount < EPL_SDO_MAX_CONNECTION_UDP) { |
702 | // check if this connection is already known | 603 | // check if this connection is already known |
703 | if ((pInstance->m_aSdoAbsUdpConnection[iCount]. | 604 | if ((pInstance->m_aSdoAbsUdpConnection[iCount]. |
@@ -733,11 +634,6 @@ static int EplSdoUdpThread(void *pArg_p) | |||
733 | pInstance-> | 634 | pInstance-> |
734 | m_aSdoAbsUdpConnection[iFreeEntry]. | 635 | m_aSdoAbsUdpConnection[iFreeEntry]. |
735 | m_uiPort = RemoteAddr.sin_port; | 636 | m_uiPort = RemoteAddr.sin_port; |
736 | #if (TARGET_SYSTEM == _WIN32_) | ||
737 | // leave critical section for process function | ||
738 | LeaveCriticalSection(SdoUdpInstance_g. | ||
739 | m_pCriticalSection); | ||
740 | #endif | ||
741 | // call callback | 637 | // call callback |
742 | SdoConHdl = iFreeEntry; | 638 | SdoConHdl = iFreeEntry; |
743 | SdoConHdl |= EPL_SDO_UDP_HANDLE; | 639 | SdoConHdl |= EPL_SDO_UDP_HANDLE; |
@@ -751,11 +647,6 @@ static int EplSdoUdpThread(void *pArg_p) | |||
751 | } else { | 647 | } else { |
752 | EPL_DBGLVL_SDO_TRACE0 | 648 | EPL_DBGLVL_SDO_TRACE0 |
753 | ("Error in EplSdoUdpThread() no free handle\n"); | 649 | ("Error in EplSdoUdpThread() no free handle\n"); |
754 | #if (TARGET_SYSTEM == _WIN32_) | ||
755 | // leave critical section for process function | ||
756 | LeaveCriticalSection(SdoUdpInstance_g. | ||
757 | m_pCriticalSection); | ||
758 | #endif | ||
759 | } | 650 | } |
760 | 651 | ||
761 | } else { | 652 | } else { |
@@ -763,11 +654,6 @@ static int EplSdoUdpThread(void *pArg_p) | |||
763 | // call callback with correct handle | 654 | // call callback with correct handle |
764 | SdoConHdl = iCount; | 655 | SdoConHdl = iCount; |
765 | SdoConHdl |= EPL_SDO_UDP_HANDLE; | 656 | SdoConHdl |= EPL_SDO_UDP_HANDLE; |
766 | #if (TARGET_SYSTEM == _WIN32_) | ||
767 | // leave critical section for process function | ||
768 | LeaveCriticalSection(SdoUdpInstance_g. | ||
769 | m_pCriticalSection); | ||
770 | #endif | ||
771 | // offset 4 -> start of SDO Sequence header | 657 | // offset 4 -> start of SDO Sequence header |
772 | pInstance->m_fpSdoAsySeqCb(SdoConHdl, | 658 | pInstance->m_fpSdoAsySeqCb(SdoConHdl, |
773 | (tEplAsySdoSeq *) & | 659 | (tEplAsySdoSeq *) & |
diff --git a/drivers/staging/epl/EplTarget.h b/drivers/staging/epl/EplTarget.h index 462c6d0c0a16..6ee8d515942d 100644 --- a/drivers/staging/epl/EplTarget.h +++ b/drivers/staging/epl/EplTarget.h | |||
@@ -83,83 +83,6 @@ | |||
83 | // applications needs to use one common library function (e.g. memcpy()). So | 83 | // applications needs to use one common library function (e.g. memcpy()). So |
84 | // you can set (or change) it here. | 84 | // you can set (or change) it here. |
85 | 85 | ||
86 | #if (TARGET_SYSTEM == _WIN32_) | ||
87 | |||
88 | #define _WIN32_WINDOWS 0x0401 | ||
89 | #define _WIN32_WINNT 0x0400 | ||
90 | |||
91 | #include <stdlib.h> | ||
92 | #include <stdio.h> | ||
93 | |||
94 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt | ||
95 | #include <string.h> | ||
96 | |||
97 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); | ||
98 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); | ||
99 | |||
100 | // f.j.: die Funktionen für <MemAlloc> und <MemFree> sind in WinMem.c definiert | ||
101 | //definition der Prototypen | ||
102 | void FAR *MemAlloc(DWORD dwMemSize_p); | ||
103 | void MemFree(void FAR * pMem_p); | ||
104 | |||
105 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | ||
106 | #define EPL_FREE(ptr) free((void *)ptr) | ||
107 | |||
108 | #ifndef PRINTF0 | ||
109 | void trace(const char *fmt, ...); | ||
110 | #define PRINTF TRACE | ||
111 | #define PRINTF0(arg) TRACE0(arg) | ||
112 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | ||
113 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | ||
114 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | ||
115 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | ||
116 | //#define PRINTF printf | ||
117 | //#define PRINTF0(arg) PRINTF(arg) | ||
118 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | ||
119 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | ||
120 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | ||
121 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | ||
122 | #endif | ||
123 | |||
124 | #ifdef ASSERTMSG | ||
125 | #undef ASSERTMSG | ||
126 | #endif | ||
127 | |||
128 | #define ASSERTMSG(expr,string) if (!(expr)) { \ | ||
129 | MessageBox (NULL, string, "Assertion failed", MB_OK | MB_ICONERROR); \ | ||
130 | exit (-1);} | ||
131 | |||
132 | #elif (TARGET_SYSTEM == _NO_OS_) | ||
133 | |||
134 | #include <stdlib.h> | ||
135 | #include <stdio.h> | ||
136 | |||
137 | //29.11.2004 f.j. sonst ist memcpy und memset unbekannt | ||
138 | // #include <string.h> | ||
139 | |||
140 | #define EPL_MEMCPY(dst,src,siz) memcpy((void*)(dst),(const void*)(src),(size_t)(siz)); | ||
141 | #define EPL_MEMSET(dst,val,siz) memset((void*)(dst),(int)(val),(size_t)(siz)); | ||
142 | |||
143 | #define EPL_MALLOC(siz) malloc((size_t)(siz)) | ||
144 | #define EPL_FREE(ptr) free((void *)ptr) | ||
145 | |||
146 | #ifndef PRINTF0 | ||
147 | #define PRINTF TRACE | ||
148 | #define PRINTF0(arg) TRACE0(arg) | ||
149 | #define PRINTF1(arg,p1) TRACE1(arg,p1) | ||
150 | #define PRINTF2(arg,p1,p2) TRACE2(arg,p1,p2) | ||
151 | #define PRINTF3(arg,p1,p2,p3) TRACE3(arg,p1,p2,p3) | ||
152 | #define PRINTF4(arg,p1,p2,p3,p4) TRACE4(arg,p1,p2,p3,p4) | ||
153 | //#define PRINTF printf | ||
154 | //#define PRINTF0(arg) PRINTF(arg) | ||
155 | //#define PRINTF1(arg,p1) PRINTF(arg,p1) | ||
156 | //#define PRINTF2(arg,p1,p2) PRINTF(arg,p1,p2) | ||
157 | //#define PRINTF3(arg,p1,p2,p3) PRINTF(arg,p1,p2,p3) | ||
158 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | ||
159 | #endif | ||
160 | |||
161 | #elif (TARGET_SYSTEM == _LINUX_) | ||
162 | |||
163 | #ifndef __KERNEL__ | 86 | #ifndef __KERNEL__ |
164 | #include <stdlib.h> | 87 | #include <stdlib.h> |
165 | #include <stdio.h> | 88 | #include <stdio.h> |
@@ -202,8 +125,6 @@ void trace(const char *fmt, ...); | |||
202 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) | 125 | //#define PRINTF4(arg,p1,p2,p3,p4) PRINTF(arg,p1,p2,p3,p4) |
203 | #endif | 126 | #endif |
204 | 127 | ||
205 | #endif | ||
206 | |||
207 | #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt | 128 | #define EPL_TGT_INTMASK_ETH 0x0001 // ethernet interrupt |
208 | #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt | 129 | #define EPL_TGT_INTMASK_DMA 0x0002 // DMA interrupt |
209 | 130 | ||
diff --git a/drivers/staging/epl/ShbIpc.h b/drivers/staging/epl/ShbIpc.h index cad8846a0824..2f2993813161 100644 --- a/drivers/staging/epl/ShbIpc.h +++ b/drivers/staging/epl/ShbIpc.h | |||
@@ -65,16 +65,7 @@ typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); | |||
65 | typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, | 65 | typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, |
66 | unsigned int fTimeOut_p); | 66 | unsigned int fTimeOut_p); |
67 | 67 | ||
68 | #if (TARGET_SYSTEM == _WIN32_) | 68 | #if (TARGET_SYSTEM == _LINUX_) |
69 | #if defined(INLINE_FUNCTION_DEF) | ||
70 | #undef INLINE_FUNCTION | ||
71 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | ||
72 | #define SHBIPC_INLINE_ENABLED TRUE | ||
73 | #define SHBIPC_INLINED | ||
74 | #include "ShbIpc-Win32.c" | ||
75 | #endif | ||
76 | |||
77 | #elif (TARGET_SYSTEM == _LINUX_) | ||
78 | #if defined(INLINE_FUNCTION_DEF) | 69 | #if defined(INLINE_FUNCTION_DEF) |
79 | #undef INLINE_FUNCTION | 70 | #undef INLINE_FUNCTION |
80 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF | 71 | #define INLINE_FUNCTION INLINE_FUNCTION_DEF |
diff --git a/drivers/staging/epl/global.h b/drivers/staging/epl/global.h index 9cd6b890ee01..64654f7fd275 100644 --- a/drivers/staging/epl/global.h +++ b/drivers/staging/epl/global.h | |||
@@ -121,8 +121,6 @@ | |||
121 | //--------------------------------------------------------------------------- | 121 | //--------------------------------------------------------------------------- |
122 | // defines for target system (TARGET_SYSTEM) | 122 | // defines for target system (TARGET_SYSTEM) |
123 | //--------------------------------------------------------------------------- | 123 | //--------------------------------------------------------------------------- |
124 | #define _WIN32_ 32 | ||
125 | #define _NO_OS_ 0 | ||
126 | #define _LINUX_ 1 | 124 | #define _LINUX_ 1 |
127 | 125 | ||
128 | //--------------------------------------------------------------------------- | 126 | //--------------------------------------------------------------------------- |