From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=fixed Message-Id: <5016cfdb6f936ed09f6d3702e04d5a95@gmail.com> Content-Transfer-Encoding: 7bit From: Don Bailey Subject: Re: [9fans] OS X threads + dynamic linking Date: Fri, 21 Apr 2006 01:00:55 -0600 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 42ef42d4-ead1-11e9-9d60-3106f5b1d025 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > 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. > Good deal. > The test program was intended only to be a minimal > illustration of the problem. > Right, that was assumed. However, if you hadn't done it on PowerPC I figured I might as well toss some code your way if you didn't feel like mucking about. > 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. > Huh, interesting. I don't have access to an x86 OSX so I didn't notice this. It's odd they haven't changed their code base to solve the tid in a more elegant fashion, as you say, like most other OSs. Don "north" Bailey -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.0.6 (Build 6060) iQA/AwUBREiDJ1/Ie1ANMtLuEQKHBwCggMAxtvNoVcWubFIeBjR4zIEHQ28Anjiz W2loMIbT6eb4Tuy/J3JWcI6J =ttLY -----END PGP SIGNATURE-----