From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] OS X threads + dynamic linking From: "Russ Cox" Date: Fri, 21 Apr 2006 02:37:53 -0500 In-Reply-To: <2239d17b56543dd0e502daa134452168@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 42e13e14-ead1-11e9-9d60-3106f5b1d025 > Just to be clear because you didn't state that this > code *is* working on MacOSX on PowerPC, is it? > Because it works for me. Just thought I'd mention > it. If you want it I'll post but it's pretty straight forward > powerpc assembly. Thanks, but I already have working context-switch code for OS X on PowerPC. The actual context-switch code I'm using for OS X on x86 is more careful than the assembly in the test program I posted. The test program was intended only to be a minimal illustration of the problem. The fact that it works on PowerPC is one of the reasons I was so surprised it doesn't work on x86. But maybe they felt the small number of x86 registers justified using the high-order bits of the stack pointer as some kind of per-thread identifier. Everyone else seems to have made that mistake too, though everyone else has corrected it. Russ