ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/NNThread.m
(Generate patch)

Comparing BasiliskII/src/MacOSX/NNThread.m (file contents):
Revision 1.1 by nigel, 2002-03-16T04:00:26Z vs.
Revision 1.4 by nigel, 2004-05-25T07:50:14Z

# Line 2 | Line 2
2   //  NNThread.m -Not Nextstep Thread?
3   //                              Nigel's Nice Thread?
4   //
5 < //      Revision 1.2, Wednesday Nov 7 2001
5 > //      Revision 1.4, Tuesday May 25 2004
6   //
7   //  Created by Nigel Pearson on Tue Nov 28 2000.
8   //  Public Domain. No rights reserved.
9   //
10  
11   #import "NNThread.h"
12 + #import <objc/objc-runtime.h>   // For objc_msgSend() prototype
13  
14   @implementation NNThread
15  
# Line 23 | Line 24
24                  thread_suspend (machThread);                                            // Suspend myself
25  
26          if ( allocPool )
27 <                pool = [[NSAutoreleasePool alloc] init];
27 >                pool = [NSAutoreleasePool new];
28  
29          // [object sel] caused "cannot find method" warnings, so I do it a non-obvious way:
30          objc_msgSend (object, sel);
# Line 42 | Line 43 | pthreadWrapper (void *arg)
43          struct pthreadArgs      *args = arg;
44  
45          if ( args -> allocPool )
46 <                args -> pool = [[NSAutoreleasePool alloc] init];
46 >                args -> pool = [NSAutoreleasePool new];
47  
48          objc_msgSend (*(args->object), *(args->sel));
49  
# Line 180 | Line 181 | pthreadWrapper (void *arg)
181          return self;
182   }
183  
184 + - (NNTimer *) initWithAutoRelPool
185 + {
186 +        self = [super init];
187 +        allocPool = YES;
188 +        repeating = YES;
189 +        return self;
190 + }
191 +
192 +
193   - (void) changeIntervalTo: (int)number
194                                          units: (NNTimeUnits)units
195   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines