mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
8a5f6fd2d5
commit
eb39994378
2 changed files with 38 additions and 10 deletions
22
ChangeLog
22
ChangeLog
|
@ -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,
|
||||
|
@ -7,14 +13,14 @@
|
|||
* Source/NSNotificationCenter.m,
|
||||
* Source/NSObject.m,
|
||||
* Source/NSZone.m:
|
||||
More tweaks for garbage collection mode, including making
|
||||
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).
|
||||
|
||||
Gorm now works correctly when built with GC enabled.
|
||||
More tweaks for garbage collection mode, including making
|
||||
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).
|
||||
Gorm now works correctly when built with GC enabled.
|
||||
|
||||
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
|
Loading…
Reference in a new issue