* Enabling pthreads to use ll/sc instead of emulate_load_store_insn
@ 2002-11-08 3:52 Wayne Gowcher
2002-11-08 5:12 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Wayne Gowcher @ 2002-11-08 3:52 UTC (permalink / raw)
To: linux-mips
Hi,
I have an userland application that uses pthreads and
crashes with a segmentaion due to an "unaligned access
in function 'emulate_load_store_insn' ".
The processor is an r4k and the application is being
compiled with mips2 switch, which I thought would
allow it to generate the ll/sc instructions natively
and not have to generate system calls to emulate it.
I am guessing this is because the pthread library I
have is from the sgi ftp site and it was compiled for
mips1 ??
If someone has any insight into how to get libpthread
to use ll/sc instructions instead of the mips system
call I would really appreciate hearing from them.
Also if anyone can "put me straight" on what is
happening I'd equally appreciate it.
Wayne
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Enabling pthreads to use ll/sc instead of emulate_load_store_insn
2002-11-08 3:52 Enabling pthreads to use ll/sc instead of emulate_load_store_insn Wayne Gowcher
@ 2002-11-08 5:12 ` Ralf Baechle
2002-11-08 5:17 ` H. J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2002-11-08 5:12 UTC (permalink / raw)
To: Wayne Gowcher; +Cc: linux-mips
On Thu, Nov 07, 2002 at 07:52:34PM -0800, Wayne Gowcher wrote:
> The processor is an r4k and the application is being
> compiled with mips2 switch, which I thought would
> allow it to generate the ll/sc instructions natively
> and not have to generate system calls to emulate it.
> I am guessing this is because the pthread library I
> have is from the sgi ftp site and it was compiled for
> mips1 ??
>
> If someone has any insight into how to get libpthread
> to use ll/sc instructions instead of the mips system
> call I would really appreciate hearing from them.
Rebuild it with -mips2. The inline code in glibc is coded such that it'll
automatically use ll/sc then.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Enabling pthreads to use ll/sc instead of emulate_load_store_insn
2002-11-08 5:12 ` Ralf Baechle
@ 2002-11-08 5:17 ` H. J. Lu
2002-11-08 5:27 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2002-11-08 5:17 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Wayne Gowcher, linux-mips
On Fri, Nov 08, 2002 at 06:12:33AM +0100, Ralf Baechle wrote:
> On Thu, Nov 07, 2002 at 07:52:34PM -0800, Wayne Gowcher wrote:
>
> > The processor is an r4k and the application is being
> > compiled with mips2 switch, which I thought would
> > allow it to generate the ll/sc instructions natively
> > and not have to generate system calls to emulate it.
> > I am guessing this is because the pthread library I
> > have is from the sgi ftp site and it was compiled for
> > mips1 ??
> >
> > If someone has any insight into how to get libpthread
> > to use ll/sc instructions instead of the mips system
> > call I would really appreciate hearing from them.
>
> Rebuild it with -mips2. The inline code in glibc is coded such that it'll
> automatically use ll/sc then.
I believe I enabled ll/sc unconditinally in glibc. Make sure you use
a recent glibc. The one from my RedHat 7.3 port should be ok.
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Enabling pthreads to use ll/sc instead of emulate_load_store_insn
2002-11-08 5:17 ` H. J. Lu
@ 2002-11-08 5:27 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2002-11-08 5:27 UTC (permalink / raw)
To: H. J. Lu; +Cc: Wayne Gowcher, linux-mips
On Thu, Nov 07, 2002 at 09:17:59PM -0800, H. J. Lu wrote:
> > Rebuild it with -mips2. The inline code in glibc is coded such that it'll
> > automatically use ll/sc then.
>
> I believe I enabled ll/sc unconditinally in glibc. Make sure you use
> a recent glibc. The one from my RedHat 7.3 port should be ok.
That's a relativly recent change. Wayne's libc obviously predates this
change ...
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-08 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-08 3:52 Enabling pthreads to use ll/sc instead of emulate_load_store_insn Wayne Gowcher
2002-11-08 5:12 ` Ralf Baechle
2002-11-08 5:17 ` H. J. Lu
2002-11-08 5:27 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox