From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O421y-0002gD-C7 for qemu-devel@nongnu.org; Mon, 19 Apr 2010 21:13:38 -0400 Received: from [140.186.70.92] (port=58697 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O421w-0002g5-4f for qemu-devel@nongnu.org; Mon, 19 Apr 2010 21:13:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O421u-0006e8-9F for qemu-devel@nongnu.org; Mon, 19 Apr 2010 21:13:36 -0400 Received: from mail-yw0-f198.google.com ([209.85.211.198]:52104) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O421u-0006dz-5R for qemu-devel@nongnu.org; Mon, 19 Apr 2010 21:13:34 -0400 Received: by ywh36 with SMTP id 36so2651007ywh.4 for ; Mon, 19 Apr 2010 18:13:33 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 19 Apr 2010 18:13:32 -0700 Message-ID: From: Gabriel Southern Content-Type: multipart/mixed; boundary=000e0cd72a323d77ac0484a0c963 Subject: [Qemu-devel] x86_64-linux-user multithreaded? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --000e0cd72a323d77ac0484a0c963 Content-Type: text/plain; charset=ISO-8859-1 Hi, Does the linux-user mode in QEMU support running multithreaded code? I am most interested in running SPARC binaries, but I tested with x86_64 and it seems like some system calls needed for pthreads are not included. I've attached a very simple program that uses pthreads. When I run it normally there is an error that says: qemu: Unsupported syscall: 202 When I run it with the -strace parameter there is additonal information: 6958 futex(0x00000040009fe06c,FUTEX_PRIVATE_FLAG|FUTEX_WAKE,1,0x00000000006895a0,0x0000000000691860,6887520)qemu: Unsupported syscall: 202 = -1 errno=38 (Function not implemented) 6958 rt_sigaction(32,274888384256,0,8,274888384432,0) = 0 6958 rt_sigaction(33,274888384256,0,8,274888384432,0) = -1 errno=22 (Invalid argument) 6958 rt_sigprocmask(1,274888384440,0,8,274888384432,0) = 0 What I'm wondering is if the x86_64-linux-user binary is expected to be able to execute multithreaded programs, or if it is only single threaded. Also depending on what the status is I"d be interested to know if there are any plans to change this in the future. Thanks, -Gabriel --000e0cd72a323d77ac0484a0c963 Content-Type: text/x-csrc; charset=US-ASCII; name="test.c" Content-Disposition: attachment; filename="test.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g880o5241 I2luY2x1ZGUgPHB0aHJlYWQuaD4gCiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8dW5pc3Rk Lmg+Cgp2b2lkICpmb28oKSB7CiAgcHJpbnRmKCJjYWxsZWQgZm9vXG4iKTsKfQoKaW50IG1haW4o KSB7CiAgcHRocmVhZF90IHQ7CiAgaW50IHJjID0gMDsKICByYyA9IHB0aHJlYWRfY3JlYXRlKCZ0 LDAsJmZvbywwKTsKICB1c2xlZXAoNTAwMCk7CiAgcHJpbnRmKCJyZXR1cm4gY29kZSBpczolZFxu IixyYyk7Cn0K --000e0cd72a323d77ac0484a0c963--