9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Don Bailey <don.bailey@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] OS X threads + dynamic linking
Date: Fri, 21 Apr 2006 01:00:55 -0600	[thread overview]
Message-ID: <5016cfdb6f936ed09f6d3702e04d5a95@gmail.com> (raw)
In-Reply-To: <f189f914a5c5e1ff5af389be91ffd83d@swtch.com>

-----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-----



  reply	other threads:[~2006-04-21  7:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21  5:43 Russ Cox
2006-04-21  5:05 ` quanstro
2006-04-21  6:21   ` Russ Cox
2006-04-21  6:24 ` Don Bailey
2006-04-21  7:37   ` Russ Cox
2006-04-21  7:00     ` Don Bailey [this message]
2006-04-21  7:55 ` David Leimbach
2006-04-21 16:24 ` David Leimbach
2006-04-21 19:05   ` "Nils O. Selåsdal"
2006-04-22  1:54   ` Russ Cox
2006-04-22 16:35     ` David Leimbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5016cfdb6f936ed09f6d3702e04d5a95@gmail.com \
    --to=don.bailey@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).