qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Ju-sung.Lee" <Ju-sung.Lee@windriver.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] thread don't work correctly in qemu-mipsel
Date: Wed, 03 Jun 2009 13:46:02 +0900	[thread overview]
Message-ID: <4A26000A.8060904@windriver.com> (raw)

Anyone seen this failure mode before?

qemu : 0.10.50
Target : Qemu-mipsel
toolchain : mipsel-linux-gcc (GCC) 4.2.4

I am attemplting to compile a thead test program in qemu-mipsel. but a thread test program don't work correctly. a thread test program is below

 #include <pthread.h>
 int check_me = 0;
 void* func(void* data) {check_me = 42; return &check_me;}
 int main()
  { pthread_t t;
    void *ret;
    pthread_create (&t, 0, func, 0);
    pthread_join (t, &ret);
    return (check_me != 42 || ret != &check_me);
 }
a check_me value should be 42 and ret address should be same with &check_me, but check_me is 0 and ret address is nil in compiled program in qemu-mipsel.

So I have tested a thread test program in qemu-arm, this test program worked correctly in qemu-arm. 
I don't know why a thread test program don't work correctly in qemu-mipsel.
Is there a problem in qemu-mipsel? 

             reply	other threads:[~2009-06-03  4:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03  4:46 Ju-sung.Lee [this message]
2009-06-03 11:32 ` [Qemu-devel] thread don't work correctly in qemu-mipsel Paul Brook

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=4A26000A.8060904@windriver.com \
    --to=ju-sung.lee@windriver.com \
    --cc=qemu-devel@nongnu.org \
    /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).