|
From: <sv...@va...> - 2005-05-29 16:23:19
|
Author: njn
Date: 2005-05-29 17:23:17 +0100 (Sun, 29 May 2005)
New Revision: 3807
Modified:
trunk/coregrind/x86-linux/core_platform.h
Log:
Remove remnants of the futex-based semaphore implementation.
Modified: trunk/coregrind/x86-linux/core_platform.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86-linux/core_platform.h 2005-05-29 16:05:37 UTC (re=
v 3806)
+++ trunk/coregrind/x86-linux/core_platform.h 2005-05-29 16:23:17 UTC (re=
v 3807)
@@ -73,74 +73,6 @@
a6 =3D arg_block[5]; \
} while (0)
=20
-/* ---------------------------------------------------------------------
- Inline asm for atomic operations for use with futexes
- Taken from futex-2.2/i386.h
- ------------------------------------------------------------------ */
-/* (C) Matthew Kirkwood <ma...@ha...>
- (C) 2002 Rusty Russell IBM <ru...@ru...>
- */
-
-/* Atomic dec: return new value. */
-static __inline__ Int __futex_down(Int *counter)
-{
- Int val;
- UChar eqz;
-
- /* Don't decrement if already negative. */
- val =3D *counter;
- if (val < 0)
- return val;
-
- /* Damn 386: no cmpxchg... */
- __asm__ __volatile__(
- "lock; decl %0; sete %1"
- :"=3Dm" (*counter), "=3Dqm" (eqz)
- :"m" (*counter) : "memory");
-
- /* We know if it's zero... */
- if (eqz) return 0;
- /* Otherwise, we have no way of knowing value. Guess -1 (if
- we're wrong we'll spin). */
- return -1;
-}
-
-/* Atomic inc: return 1 if counter incremented from 0 to 1. */
-static __inline__ Int __futex_up(Int *c)
-{
- Int r =3D 1;
-
- /* This actually tests if result >=3D 1. Damn 386. --RR */
- __asm__ __volatile__ (
- " lock; incl %1\n"
- " jg 1f\n"
- " decl %0\n"
- "1:\n"
- : "=3Dq"(r), "=3Dm"(*c) : "0"(r)
- );
- return r;
-}
-
-/* Simple atomic increment. */
-static __inline__ void __atomic_inc(Int *c)
-{
- __asm__ __volatile__(
- "lock; incl %0"
- :"=3Dm" (*c)
- :"m" (*c));
-}
-
-
-/* Commit the write, so it happens before we send the semaphore to
- anyone else */
-static __inline__ void __futex_commit(void)
-{
- /* Probably overkill, but some non-Intel clones support
- out-of-order stores, according to 2.5.5-pre1's
- linux/include/asm-i386/system.h */
- __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory");
-}
-
#endif // __X86_LINUX_CORE_PLATFORM_H
=20
/*--------------------------------------------------------------------*/
|