Re: Objective-C threads
On Sun, Nov 24, 2002 at 05:06:05PM -0800, Terry Lambert wrote: Chad David wrote: On Wed, Oct 30, 2002 at 02:19:43AM -0800, David O'Brien wrote: Perhaps because maintaining them in the FreeBSD repo might be the wrong place. To answer your other questiion -- because a change to fix one thing for one person might break things for 10 others. Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I do have other patches for thr-posix, but I agree that it would be better if they went to gcc, and didn't get stacked locally. And I thought this thread was dead :). The answer is that your other patches have not been committed to gcc, so any changes to gcc, other than configuration, would have to be maintained in the FreeBSD repository. I personally have no problem with this, if it makes Objective C work where it didn't before, and doesn't impact and other code, or non-Objective C compilations. But I am not the maintainer, and David O'Brien is, so it is him you have to convince, since it is for him you are making extra work. I don't really feel a need to convince. If people are too busy (or just do not care) to maintain ObjC within FreeBSD, then I'll just have to do it locally. Its actually less work for me to keep my patches to myself, and I'm certainly not trying to volunteer obrien for more work. We are all busy and ObjC is hardly a priority for many. It may seem the slow way around, but you should submit your patches to the gcc folks first, and wait for them to be included, such that FreeBSD will need only configuration changes. I've done that, but have not yet received any feedback. I have gotten literally hundreds of patches into FreeBSD by ignoring the FreeBSD process, and submitting the patches back to the vendor from which FreeBSD obtains the code, so this is a success strategy. Manipulation is a life stategy :). -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
[ ... Objective C ... ] Chad David wrote: And I thought this thread was dead :). It just showed up in the inbox last night; it must have been stuck in your mail server. Sorry about that. I don't really feel a need to convince. If people are too busy (or just do not care) to maintain ObjC within FreeBSD, then I'll just have to do it locally. That's kind of what I was implying would be the correct course of action for a while. 8-). I have gotten literally hundreds of patches into FreeBSD by ignoring the FreeBSD process, and submitting the patches back to the vendor from which FreeBSD obtains the code, so this is a success strategy. Manipulation is a life stategy :). Anything that works is better than anything that doesn't. 8-). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 09:47:02PM -0600, Loren James Rittle wrote: Use thr-objc not thr-posix. thr-objc maps to the gcc generic thread abstration layer and is better supported these days. It will also correctly disable overhead related to threading when a program is single-threaded using weak symbols. thr-posix doesn't do that... I've been trying to get it to work with weak symbols, but have not had any luck yet. I'm pretty sure I'm just missing something simple, but if you have a working config for FreeBSD I'd love to see it. The current situation doesn't seem optimal, ie. requiring -pthread for none threaded programs. There is also the issue of config.h.in, which needs to become config.h. This shouldn't be a big deal, I'm just not sure what the prefered method is (just repo copy it?). -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
In article [EMAIL PROTECTED], Chad David[EMAIL PROTECTED] writes: Use thr-objc not thr-posix. thr-objc maps to the gcc generic thread abstration layer and is better supported these days. It will also correctly disable overhead related to threading when a program is single-threaded using weak symbols. thr-posix doesn't do that... I've been trying to get it to work with weak symbols, but have not had any luck yet. I'm pretty sure I'm just missing something simple, but if you have a working config for FreeBSD I'd love to see it. (I could tar up a built copy if you want to look at a stable configuration, but it is based on FSF configure not FreeBSD /usr/src Makefiles; however it should be easy for you to get to that point yourself.) The current situation doesn't seem optimal, ie. requiring -pthread for none threaded programs. There is also the issue of config.h.in, which needs to become config.h. This shouldn't be a big deal, I'm just not sure what the prefered method is (just repo copy it?). Sorry, I don't use/support ObjC at all, however gcc 3.2 doesn't require -pthread to link a single-threaded program when built using the FSF configure-generated Makefiles which build against thr-objc (gcc 3.[01].X should have all been similar). To wit: nm /usr/local/lib/libobjc.a|grep pthread w pthread_attr_destroy [...] w pthread_setspecific My only advise might be: A lot of configuration stuff regarding libobjc has subtly changed in the FSF tree, perhaps you should attempt to build a copy using the standard FSF configure technique then resync the master FreeBSD Makefiles for that package. Regards, Loren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Tue, Oct 29, 2002 at 11:52:56PM -0800, Terry Lambert wrote: That said, if you want to make it work for you, I'm behind you 100%: I think any changes you want to make are OK; they can always be backed out, if anyone starts complaining about them breaking things, so I think it's kind of silly for you to ask for permission to maintain something no one else is maintaining. Perhaps because maintaining them in the FreeBSD repo might be the wrong place. To answer your other questiion -- because a change to fix one thing for one person might break things for 10 others. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
David O'Brien wrote: On Tue, Oct 29, 2002 at 11:52:56PM -0800, Terry Lambert wrote: That said, if you want to make it work for you, I'm behind you 100%: I think any changes you want to make are OK; they can always be backed out, if anyone starts complaining about them breaking things, so I think it's kind of silly for you to ask for permission to maintain something no one else is maintaining. Perhaps because maintaining them in the FreeBSD repo might be the wrong place. To answer your other questiion -- because a change to fix one thing for one person might break things for 10 others. they can always be backed out, if anyone starts complaining about them breaking things Better to have someone trying, than no one doing anything (IMO). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
Hi, I don't think many people in the FreeBSD community use Objective-C, hence the apparent lack of a maintainer. The proper way to submit patches to the [EMAIL PROTECTED] mailing list at the FSF GCC project is to follow the procedures documented at: http://gcc.gnu.org/contribute.html If you are used to how patches are submitted in FreeBSD, it's no big deal. In the source code for gcc, you will see a file called MAINTAINERS. The MAINTAINERS file lists a few names under Objective-C: objective-c Stan Shebs [EMAIL PROTECTED] objective-c Ovidiu Predescu [EMAIL PROTECTED] The most active maintenance of objective-c is going on at Apple, because of all the old NeXT stuff that they have in MacOS X. Keeping in touch with the darwin-development mailing list at Apple would probably not be a bad idea, since a lot of the Apple compiler developers read that list. http://lists.apple.com/mailman/listinfo/darwin-development -- Craig Rodrigues http://www.gis.net/~craigr [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 02:17:07AM -0800, David O'Brien wrote: On Tue, Oct 29, 2002 at 09:02:16PM -0700, Chad David wrote: On Tue, Oct 29, 2002 at 07:11:56PM -0800, David O'Brien wrote: On Tue, Oct 29, 2002 at 07:09:41PM -0700, Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? As well, who is the current maintainer of Objective-C? Few of us have ObjC clue. Do you have a patch that makes things better that you can explain to us? To start with I have a few changes to hash.h, objc-list.h and thr.h that allow my code to even compile (without warnings) with I have attached. I believe they are all pretty obvious, except for the change to compare_ptrs(), which I'm not totally sure about... Is there any reason you have not sent these changes to the [EMAIL PROTECTED] list? It looks like you're making generic ObjC chagnes, not FreeBSD specific ones. No there is no reason, and yes the changes are generic. I don't really expect there to be many (if any) changes to libobjc that are not generic, so if gcc-patches is the place to go, that is where I'll go. In your experience, how long is the delay between gcc-patches accepting something and FreeBSD picking it up, ie. is it worth the effort? -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 02:19:43AM -0800, David O'Brien wrote: On Tue, Oct 29, 2002 at 11:52:56PM -0800, Terry Lambert wrote: That said, if you want to make it work for you, I'm behind you 100%: I think any changes you want to make are OK; they can always be backed out, if anyone starts complaining about them breaking things, so I think it's kind of silly for you to ask for permission to maintain something no one else is maintaining. Perhaps because maintaining them in the FreeBSD repo might be the wrong place. To answer your other questiion -- because a change to fix one thing for one person might break things for 10 others. Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I do have other patches for thr-posix, but I agree that it would be better if they went to gcc, and didn't get stacked locally. -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 02:23:00AM -0800, Terry Lambert wrote: David O'Brien wrote: On Tue, Oct 29, 2002 at 11:52:56PM -0800, Terry Lambert wrote: That said, if you want to make it work for you, I'm behind you 100%: I think any changes you want to make are OK; they can always be backed out, if anyone starts complaining about them breaking things, so I think it's kind of silly for you to ask for permission to maintain something no one else is maintaining. Perhaps because maintaining them in the FreeBSD repo might be the wrong place. To answer your other questiion -- because a change to fix one thing for one person might break things for 10 others. they can always be backed out, if anyone starts complaining about them breaking things Better to have someone trying, than no one doing anything (IMO). Because making these changes will take files off the vendor branch -- something we think about before doing. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 09:23:53AM -0700, Chad David wrote: Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I am not sure. But for some reason you didn't provide a patch that would turn them on. All you provided was a minor patches that really should go thru the offical FSF GCC repo in-route to FreeBSD. So back to my original request. Do you have a patch for changing this part of the way we configure and build ObjC that you feel might be wrong? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
* De: David O'Brien [EMAIL PROTECTED] [ Data: 2002-10-30 ] [ Subjecte: Re: Objective-C threads ] On Wed, Oct 30, 2002 at 09:23:53AM -0700, Chad David wrote: Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I am not sure. But for some reason you didn't provide a patch that would turn them on. All you provided was a minor patches that really should go thru the offical FSF GCC repo in-route to FreeBSD. So back to my original request. Do you have a patch for changing this part of the way we configure and build ObjC that you feel might be wrong? With a simple test program, %%% #include objc/Object.h #include pthread.h #include stdio.h @interface Test : Object { const char *string; } -(void) set:(const char *)str; -(void) print; @end @implementation Test -(void) set:(const char *)str { string = str; } -(void) print { printf(Test: %s\n, string); } @end id obj; static void *thr(void *ctxt __unused) { [obj print]; [obj set:Inside]; [obj print]; } void main(void) { pthread_t td; obj = [Test alloc]; [obj set:Threads]; pthread_create(td, NULL, thr, NULL); pthread_yield(); exit(0); } %%% It seems a simple case doesn't break: (jmallett@luna:~)121% cc test.m -lobjc -pthread test.m: In function `main': test.m:31: warning: return type of `main' is not `int' (jmallett@luna:~)122% ./a.out Test: Threads Test: Inside Simply with using thr-posix.c. %%% (jmallett@luna:~/gnu/lib/libobjc)128% cvs diff cvs server: Diffing . Index: Makefile === RCS file: /home/ncvs/src/gnu/lib/libobjc/Makefile,v retrieving revision 1.14 diff -r1.14 Makefile 14c14 thr.c thr-single.c \ --- thr.c thr-posix.c \ %%% Thanks, juli. -- Juli Mallett [EMAIL PROTECTED] | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger [EMAIL PROTECTED] http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 09:16:26AM -0700, Chad David wrote: No there is no reason, and yes the changes are generic. I don't really expect there to be many (if any) changes to libobjc that are not generic, so if gcc-patches is the place to go, that is where I'll go. It is. In your experience, how long is the delay between gcc-patches accepting something and FreeBSD picking it up, ie. is it worth the effort? It all depends on where we are in our release cycle vs. GCC's. Ie, we don't update what is in /usr/src every week. We do update the GCC ports frequently (every 2 weeks or so). It is worth the effort as the toolchain maintainers may take the stance that making these changes aren't worth the maintaince effor that taking something off the vendor branch entails. So the effort is your only way to make these const'ifying changes. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Wed, Oct 30, 2002 at 09:09:16AM -0800, David O'Brien wrote: On Wed, Oct 30, 2002 at 09:23:53AM -0700, Chad David wrote: Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I am not sure. But for some reason you didn't provide a patch that would turn them on. All you provided was a minor patches that really should go thru the offical FSF GCC repo in-route to FreeBSD. So back to my original request. Do you have a patch for changing this part of the way we configure and build ObjC that you feel might be wrong? That is fair. Here is a patch to start with. There are minor problems with thr-posix.c, but I'll take them up with the appropriate people. Thanks. -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada Index: Makefile === RCS file: /mnt1/ncvs/src/gnu/lib/libobjc/Makefile,v retrieving revision 1.14 diff -u -d -r1.14 Makefile --- Makefile12 May 2002 16:00:46 - 1.14 +++ Makefile29 Oct 2002 21:34:52 - @@ -11,7 +11,7 @@ SRCS= archive.c class.c encoding.c gc.c hash.c init.c misc.c \ nil_method.c objects.c sarray.c selector.c sendmsg.c \ - thr.c thr-single.c \ + thr.c thr-posix.c \ NXConstStr.m Object.m Protocol.m linking.m INCS= encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \
Re: Objective-C threads
On Wed, Oct 30, 2002 at 09:22:21AM -0800, Juli Mallett wrote: * De: David O'Brien [EMAIL PROTECTED] [ Data: 2002-10-30 ] [ Subjecte: Re: Objective-C threads ] On Wed, Oct 30, 2002 at 09:23:53AM -0700, Chad David wrote: Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I am not sure. But for some reason you didn't provide a patch that would turn them on. All you provided was a minor patches that really should go thru the offical FSF GCC repo in-route to FreeBSD. So back to my original request. Do you have a patch for changing this part of the way we configure and build ObjC that you feel might be wrong? With a simple test program, [cut] obj = [Test alloc]; [obj set:Threads]; pthread_create(td, NULL, thr, NULL); This will work the way FreeBSD currently builds ObjC, what I want to use is objc_thread_xxx() and friends, so that the code maintains portability, and the runtime is kept up to date with what is going on. For example: accept_thread = objc_thread_detach(@selector(processLoop:), self, Nil); objc_thread_yield(); ... thr-single.c simply returns an error for each thread call. pthread_yield(); exit(0); } (jmallett@luna:~/gnu/lib/libobjc)128% cvs diff cvs server: Diffing . Index: Makefile === RCS file: /home/ncvs/src/gnu/lib/libobjc/Makefile,v retrieving revision 1.14 diff -r1.14 Makefile 14c14 thr.c thr-single.c \ --- thr.c thr-posix.c \ Yes, this is what I did. Thanks. -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
* De: Chad David [EMAIL PROTECTED] [ Data: 2002-10-30 ] [ Subjecte: Re: Objective-C threads ] On Wed, Oct 30, 2002 at 09:22:21AM -0800, Juli Mallett wrote: * De: David O'Brien [EMAIL PROTECTED] [ Data: 2002-10-30 ] [ Subjecte: Re: Objective-C threads ] On Wed, Oct 30, 2002 at 09:23:53AM -0700, Chad David wrote: Which brings us back to my original question... why are ObjC threads disabled? I don't much care about my other patches, I just want to know who the 10 others are who will break if we enable threads, and how to fix that breakage. My minor patches were only posted because you asked :). I am not sure. But for some reason you didn't provide a patch that would turn them on. All you provided was a minor patches that really should go thru the offical FSF GCC repo in-route to FreeBSD. So back to my original request. Do you have a patch for changing this part of the way we configure and build ObjC that you feel might be wrong? With a simple test program, [cut] obj = [Test alloc]; [obj set:Threads]; pthread_create(td, NULL, thr, NULL); This will work the way FreeBSD currently builds ObjC, what I want to use is objc_thread_xxx() and friends, so that the code maintains portability, and the runtime is kept up to date with what is going on. My point was it doesn't break currently working things in a threading case. Your observations of the real issues are, of course, correct :) When you're chattign with the gcc objc people, get them to fix the nit in README.threads or THREADS where it says if you have a thread-aware GCC you can use thr-gcc.c... That file does not seem to exist, at least not in our contrib sources. juli. -- Juli Mallett [EMAIL PROTECTED] | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger [EMAIL PROTECTED] http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
Chad David wrote: That said, if you want to make it work for you, I'm behind you 100%: I think any changes you want to make are OK; they can always be backed out, if anyone starts complaining about them breaking things, so I think it's kind of silly for you to ask for permission to maintain something no one else is maintaining. I wouldn't say I'm asking for permission, I'd be more inclined to say I'm asking for guidance :). I've seen what happens when somebody commits to gcc, and life is just too short.. Nothing you do to Objective C gould break make world; the only thing you have to worry about is ports, and you can identify them and keep them happy before you commit something. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
Chad David wrote: In your experience, how long is the delay between gcc-patches accepting something and FreeBSD picking it up, ie. is it worth the effort? Jeremey Allison (of SAMBA) and I made patches to ACAP to get it to compile under G++, and that required patches to G++ 2.9.3 to support per thread exception handlers. It took about 6 months to get them into ECC, and the ones they added to ECC bloated the library in the non-threads case, rather than registering the handlers in the thread creation case only, like Jeremy originally had it doing. It took another 6 months before the new compiler made it into FreeBSD. So expect it to take you about a year, particularly since 3.2.1 was just imported for the 5.x release, and the compiler is not very likely to have a major number upgrade until 6.x. IMO, you are better off doing it as a patch in the FreeBSD tree, if you want it to work in FreeBSD in less than a year, but you should *also* send it into the GCC people, because if you don't, they'll potentially fix it the wrong way for your application, and their code will conflict with your patch, and you'll be hating life. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
Use thr-objc not thr-posix. thr-objc maps to the gcc generic thread abstration layer and is better supported these days. It will also correctly disable overhead related to threading when a program is single-threaded using weak symbols. thr-posix doesn't do that... Regards, Loren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
* De: Loren James Rittle [EMAIL PROTECTED] [ Data: 2002-10-30 ] [ Subjecte: Re: Objective-C threads ] Use thr-objc not thr-posix. thr-objc maps to the gcc generic thread abstration layer and is better supported these days. It will also correctly disable overhead related to threading when a program is single-threaded using weak symbols. thr-posix doesn't do that... So *that's* where thr-gcc went! -- Juli Mallett [EMAIL PROTECTED] | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger [EMAIL PROTECTED] http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Objective-C threads
Does anybody know if there is a good reason why libobjc is built with thr-single.c? As well, who is the current maintainer of Objective-C? -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? Historical threads problems. As well, who is the current maintainer of Objective-C? Chad David? -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Tue, Oct 29, 2002 at 07:09:41PM -0700, Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? As well, who is the current maintainer of Objective-C? Few of us have ObjC clue. Do you have a patch that makes things better that you can explain to us? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
On Tue, Oct 29, 2002 at 07:11:56PM -0800, David O'Brien wrote: On Tue, Oct 29, 2002 at 07:09:41PM -0700, Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? As well, who is the current maintainer of Objective-C? Few of us have ObjC clue. Do you have a patch that makes things better that you can explain to us? To start with I have a few changes to hash.h, objc-list.h and thr.h that allow my code to even compile (without warnings) with I have attached. I believe they are all pretty obvious, except for the change to compare_ptrs(), which I'm not totally sure about... I have additional updates to the threading, but I'm not quite finished going through it all yet. -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada diff -ud ./hash.h /usr/include/objc/hash.h --- ./hash.hThu May 9 16:50:04 2002 +++ /usr/include/objc/hash.hWed Oct 23 17:13:23 2002 @@ -174,8 +174,8 @@ unsigned int ctr = 0; - while (*(char*)key) { -ret ^= *(char*)key++ ctr; + while (*(const char*)key) { +ret ^= *((const char*)key)++ ctr; ctr = (ctr + 1) % sizeof (void *); } @@ -187,7 +187,7 @@ static inline int compare_ptrs (const void *k1, const void *k2) { - return !(k1 - k2); + return (k1 == k2); } diff -ud ./objc-list.h /usr/include/objc/objc-list.h --- ./objc-list.h Wed Mar 29 20:23:36 2000 +++ /usr/include/objc/objc-list.h Wed Oct 23 17:14:21 2002 @@ -64,9 +64,9 @@ larger than the list length, NULL is returned */ static inline void* -list_nth(int index, struct objc_list* list) +list_nth(int indx, struct objc_list* list) { - while(index-- != 0) + while(indx-- != 0) { if(list-tail) list = list-tail; diff -ud ./thr.h /usr/include/objc/thr.h --- ./thr.h Thu May 9 16:50:04 2002 +++ /usr/include/objc/thr.h Wed Oct 23 17:13:47 2002 @@ -111,7 +111,7 @@ it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ -typedef void (*objc_thread_callback)(); +typedef void (*objc_thread_callback)(void); objc_thread_callback objc_set_thread_callback(objc_thread_callback func); /* Backend initialization functions */
Re: Objective-C threads
On Tue, Oct 29, 2002 at 07:04:21PM -0800, Terry Lambert wrote: Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? Historical threads problems. A few are obvious from simply reading the code. Do you have any knowledge of specific (non-trivial) problems? As well, who is the current maintainer of Objective-C? Chad David? By default, since there seem to be no other users? -- Chad David[EMAIL PROTECTED] www.FreeBSD.org [EMAIL PROTECTED] ISSci Inc.Calgary, Alberta Canada To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
* De: Chad David [EMAIL PROTECTED] [ Data: 2002-10-29 ] [ Subjecte: Re: Objective-C threads ] As well, who is the current maintainer of Objective-C? Chad David? By default, since there seem to be no other users? I'm willing to help out with testing Objective-C stuff, and any problems, too, as I'm quite a big fan/user of ObjC, most of the time. juli. -- Juli Mallett [EMAIL PROTECTED] | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger [EMAIL PROTECTED] http://people.FreeBSD.org/~jmallett/ | Support my FreeBSD hacking! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Objective-C threads
David O'Brien wrote: On Tue, Oct 29, 2002 at 07:09:41PM -0700, Chad David wrote: Does anybody know if there is a good reason why libobjc is built with thr-single.c? As well, who is the current maintainer of Objective-C? Few of us have ObjC clue. Do you have a patch that makes things better that you can explain to us? Or do you just have a patch? There's no reason for people who don't use Objective C (like me) need to pee on it to make it smell like us... especially if we need it explained to us for us to understand it. 8-) 8-). It's better that the code works than that people who don't use the code understand it, and it not work... -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message