All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] x86_64-linux-user multithreaded?
@ 2010-04-20  1:13 Gabriel Southern
  2010-04-21 14:16 ` Mulyadi Santosa
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Southern @ 2010-04-20  1:13 UTC (permalink / raw
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]

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

[-- Attachment #2: test.c --]
[-- Type: text/x-csrc, Size: 237 bytes --]

#include <pthread.h> 
#include <stdio.h>
#include <unistd.h>

void *foo() {
  printf("called foo\n");
}

int main() {
  pthread_t t;
  int rc = 0;
  rc = pthread_create(&t,0,&foo,0);
  usleep(5000);
  printf("return code is:%d\n",rc);
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] x86_64-linux-user multithreaded?
  2010-04-20  1:13 [Qemu-devel] x86_64-linux-user multithreaded? Gabriel Southern
@ 2010-04-21 14:16 ` Mulyadi Santosa
  0 siblings, 0 replies; 2+ messages in thread
From: Mulyadi Santosa @ 2010-04-21 14:16 UTC (permalink / raw
  To: Gabriel Southern; +Cc: qemu-devel

On Tue, Apr 20, 2010 at 08:13, Gabriel Southern
<gabriel.southern@gmail.com> wrote:
> 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

AFAIK, NPTL support is still far from complete.... Maybe that's the reason...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-21 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  1:13 [Qemu-devel] x86_64-linux-user multithreaded? Gabriel Southern
2010-04-21 14:16 ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.