mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +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
3037852464
commit
794bd55f57
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>
|
2011-05-25 11:15 David Chisnall <theraven@gna.org>
|
||||||
|
|
||||||
* Headers/Foundation/NSZone.h,
|
* Headers/Foundation/NSZone.h,
|
||||||
|
@ -7,14 +13,14 @@
|
||||||
* Source/NSNotificationCenter.m,
|
* Source/NSNotificationCenter.m,
|
||||||
* Source/NSObject.m,
|
* Source/NSObject.m,
|
||||||
* Source/NSZone.m:
|
* Source/NSZone.m:
|
||||||
More tweaks for garbage collection mode, including making
|
More tweaks for garbage collection mode, including making
|
||||||
NSNotificationCenter use weak pointers (things are never removed if it
|
NSNotificationCenter use weak pointers (things are never removed if it
|
||||||
uses strong pointers because they remove themselves in the -dealloc
|
uses strong pointers because they remove themselves in the -dealloc
|
||||||
method, which is never called, and can't remove themselves in the
|
method, which is never called, and can't remove themselves in the
|
||||||
-finalize method because the -finalize method would not be called until
|
-finalize method because the -finalize method would not be called
|
||||||
after they have been removed - this is consistent with Apple behaviour).
|
until after they have been removed - this is consistent with Apple
|
||||||
|
behaviour).
|
||||||
Gorm now works correctly when built with GC enabled.
|
Gorm now works correctly when built with GC enabled.
|
||||||
|
|
||||||
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-05-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,8 @@ typedef int32_t volatile *gsatomic_t;
|
||||||
|
|
||||||
#define GSATOMICREAD(X) (*(X))
|
#define GSATOMICREAD(X) (*(X))
|
||||||
|
|
||||||
int
|
#ifdef ATOMICTEST
|
||||||
|
static __inline__ int
|
||||||
GSAtomicIncrement(gsatomic_t X)
|
GSAtomicIncrement(gsatomic_t X)
|
||||||
{
|
{
|
||||||
int32_t tmp = 1;
|
int32_t tmp = 1;
|
||||||
|
@ -238,7 +239,7 @@ GSAtomicIncrement(gsatomic_t X)
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static __inline__ int
|
||||||
GSAtomicDecrement(gsatomic_t X)
|
GSAtomicDecrement(gsatomic_t X)
|
||||||
{
|
{
|
||||||
int32_t tmp = -1;
|
int32_t tmp = -1;
|
||||||
|
@ -249,6 +250,27 @@ GSAtomicDecrement(gsatomic_t X)
|
||||||
:"memory" );
|
:"memory" );
|
||||||
return tmp;
|
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__)
|
#elif defined(__PPC__) || defined(__POWERPC__)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue