Subject: Re: pthread problem on powerpc/ibm4xx
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Shigeyuki Fukushima <shige@netbsd.org>
List: port-powerpc
Date: 03/24/2006 01:00:27
I'm sorry that I couldn't reply earlier.

Nathan J. Williams wrote:

> The core of this problem is that setmcontext() uses PSL_USEROK_P(),
> which differs among PowerPC CPUs, and returns an error if the value
> passed in (by the setcontext syscall) doesn't conform. I chose that
> magic value to work on OEA CPUs; at the time I wrote it, I did not
> realize that it was OEA-only.
> 
> There are two approaches to solving the problem:
(snip)
> 2. Make setmcontext() fix up the passed-in MSR value instead of
>    erroring out. Libpthread then does not need the magic value at
>    all. I think this is the more useful approach; it hides the
>    machine-dependance entirely.
> Here is a patch for #2:

It works fine for me (on OpenBlockS266).
I want to appply your patch to -current src tree.

How about it?

-- 
Kind Regards,
--- shige
Shigeyuki Fukushima <shige@{FreeBSD,jp.FreeBSD,NetBSD}.org>