Author: sserapion
Date: Sun Jul 27 03:34:16 2008
New Revision: 34832
URL:
http://svn.reactos.org/svn/reactos?rev=34832&view=rev
Log:
Remove WINEisms
Modified:
branches/ros-amd64-bringup/reactos/include/reactos/wine/port.h
Modified: branches/ros-amd64-bringup/reactos/include/reactos/wine/port.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/wine/port.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/wine/port.h [iso-8859-1] Sun Jul 27
03:34:16 2008
@@ -328,53 +328,12 @@
#if defined(__i386__) && defined(__GNUC__) &&
!defined(WINE_PORT_NO_INTERLOCKED)
-extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare )
-{
- long ret;
- __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
- : "=a" (ret) : "r" (dest), "r"
(xchg), "0" (compare) : "memory" );
- return ret;
-}
-
-extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare )
-{
- void *ret;
- __asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
- : "=a" (ret) : "r" (dest), "r"
(xchg), "0" (compare) : "memory" );
- return ret;
-}
-
-extern inline long interlocked_xchg( long *dest, long val )
-{
- long ret;
- __asm__ __volatile__( "lock; xchgl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0"
(val) : "memory" );
- return ret;
-}
-
-extern inline void *interlocked_xchg_ptr( void **dest, void *val )
-{
- void *ret;
- __asm__ __volatile__( "lock; xchgl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0"
(val) : "memory" );
- return ret;
-}
-
-extern inline long interlocked_xchg_add( long *dest, long incr )
-{
- long ret;
- __asm__ __volatile__( "lock; xaddl %0,(%1)"
- : "=r" (ret) : "r" (dest), "0"
(incr) : "memory" );
- return ret;
-}
-
-#else /* __i386___ && __GNUC__ */
-
-extern long interlocked_cmpxchg( long *dest, long xchg, long compare );
-extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
-extern long interlocked_xchg( long *dest, long val );
-extern void *interlocked_xchg_ptr( void **dest, void *val );
-extern long interlocked_xchg_add( long *dest, long incr );
+#define interlocked_cmpxchg InterlockedCompareExchange
+#define interlocked_cmpxchg_ptr InterlockedCompareExchangePtr
+#define interlocked_xchg InterlockedExchange
+#define interlocked_xchg_ptr InterlockedExchangePtr
+#define interlocked_xchg_add InterlockedExchangeAdd
+
#endif /* __i386___ && __GNUC__ */
@@ -385,11 +344,6 @@
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
-#define interlocked_cmpxchg __WINE_NOT_PORTABLE(interlocked_cmpxchg)
-#define interlocked_cmpxchg_ptr __WINE_NOT_PORTABLE(interlocked_cmpxchg_ptr)
-#define interlocked_xchg __WINE_NOT_PORTABLE(interlocked_xchg)
-#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
-#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
#define lstat __WINE_NOT_PORTABLE(lstat)
#define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned)
#define memmove __WINE_NOT_PORTABLE(memmove)