* Headers/Additions/GNUstepBase/GSVersionMacros.h: Add

defines for earlier version of Mac OS X back to 10.0.
	* Source/synchronization.m: Correct a problem found during testing.
	* Testing/synctest/main.m: Updated test.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27136 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-11-26 15:06:06 +00:00
parent 0ac29f22e7
commit 42ce7ccd01
4 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2008-11-26 10:09-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/Additions/GNUstepBase/GSVersionMacros.h: Add
defines for earlier version of Mac OS X back to 10.0.
* Source/synchronization.m: Correct a problem found during testing.
* Testing/synctest/main.m: Updated test.
2008-11-24 Richard Frith-Macdonald <rfm@gnu.org> 2008-11-24 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: ([methodSignatureForSelector:]) Check that the * Source/NSObject.m: ([methodSignatureForSelector:]) Check that the

View file

@ -44,12 +44,14 @@
* instead of GS_OPENSTEP_V * instead of GS_OPENSTEP_V
*/ */
#ifndef MAC_OS_X_VERSION_10_2 #ifndef MAC_OS_X_VERSION_10_0
#define MAC_OS_X_VERSION_10_0 100000
#define MAC_OS_X_VERSION_10_1 100100
#define MAC_OS_X_VERSION_10_2 100200 #define MAC_OS_X_VERSION_10_2 100200
#define MAC_OS_X_VERSION_10_3 100300 #define MAC_OS_X_VERSION_10_3 100300
#define MAC_OS_X_VERSION_10_4 100400 #define MAC_OS_X_VERSION_10_4 100400
#define MAC_OS_X_VERSION_10_5 100500 #define MAC_OS_X_VERSION_10_5 100500
#endif /* MAC_OS_X_VERSION_10_2 */ #endif /* MAC_OS_X_VERSION_10_0 */
#ifndef GS_OPENSTEP_V #ifndef GS_OPENSTEP_V
#ifdef MAC_OS_X_VERSION_MIN_ALLOWED #ifdef MAC_OS_X_VERSION_MIN_ALLOWED

View file

@ -167,6 +167,7 @@ objc_sync_enter(id obj)
int status = 0; int status = 0;
// lock access to the table until we're done.... // lock access to the table until we're done....
sync_lock_init();
objc_mutex_lock(table_lock); objc_mutex_lock(table_lock);
node = sync_find_node(obj); node = sync_find_node(obj);
@ -207,6 +208,7 @@ objc_sync_exit(id obj)
int status = 0; int status = 0;
// lock access to the table until we're done.... // lock access to the table until we're done....
sync_lock_init();
objc_mutex_lock(table_lock); objc_mutex_lock(table_lock);
node = sync_find_node(obj); node = sync_find_node(obj);

View file

@ -9,14 +9,14 @@ static NSArray *array;
@implementation SyncTest @implementation SyncTest
- (void) sayHello - (void) sayHello
{ {
NSLog(@"Before the sync block %@",[NSThread currentThread]); NSLog(@"Before the sync block %s\n",[[[NSThread currentThread] description] cString]);
@synchronized(array) { @synchronized(array) {
NSLog(@"In the sync block %@:%d",[NSThread currentThread],[NSThread isMainThread]); NSLog(@"In the sync block %s:%d\n",[[[NSThread currentThread] description] cString], [NSThread isMainThread]);
NSLog(@"Waiting five seconds..."); NSLog(@"Waiting five seconds...\n");
[NSThread sleepForTimeInterval: 5.0]; [NSThread sleepForTimeInterval: 5.0];
NSLog(@"Done waiting"); NSLog(@"Done waiting\n");
} }
NSLog(@"After the sync block %@",[NSThread currentThread]); NSLog(@"After the sync block %s\n",[[[NSThread currentThread] description] cString]);
} }
@end @end