partial revert

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33115 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-05-25 15:53:17 +00:00
parent 3037852464
commit 794bd55f57
2 changed files with 38 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m:
Make last assembler attempt conditional ... I'm far from sure it's
correct.
2011-05-25 11:15 David Chisnall <theraven@gna.org>
* Headers/Foundation/NSZone.h,
@ -11,9 +17,9 @@
NSNotificationCenter use weak pointers (things are never removed if it
uses strong pointers because they remove themselves in the -dealloc
method, which is never called, and can't remove themselves in the
-finalize method because the -finalize method would not be called until
after they have been removed - this is consistent with Apple behaviour).
-finalize method because the -finalize method would not be called
until after they have been removed - this is consistent with Apple
behaviour).
Gorm now works correctly when built with GC enabled.
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -226,7 +226,8 @@ typedef int32_t volatile *gsatomic_t;
#define GSATOMICREAD(X) (*(X))
int
#ifdef ATOMICTEST
static __inline__ int
GSAtomicIncrement(gsatomic_t X)
{
int32_t tmp = 1;
@ -238,7 +239,7 @@ GSAtomicIncrement(gsatomic_t X)
return tmp;
}
int
static __inline__ int
GSAtomicDecrement(gsatomic_t X)
{
int32_t tmp = -1;
@ -249,6 +250,27 @@ GSAtomicDecrement(gsatomic_t X)
:"memory" );
return tmp;
}
#else
static __inline__ int
GSAtomicIncrement(gsatomic_t X)
{
__asm__ __volatile__ (
"lock addl $1, %0"
:"=m" (*X));
return *X;
}
static __inline__ int
GSAtomicDecrement(gsatomic_t X)
{
__asm__ __volatile__ (
"lock subl $1, %0"
:"=m" (*X));
return *X;
}
#endif
#elif defined(__PPC__) || defined(__POWERPC__)