Hi all,
I launch FS mode (x86) with 2 cpus and test a very simple pthreads
hello program on it, but failed with the following msg:
**** REAL SIMULATION ****
info: Entering event queue @ 0. Starting simulation...
warn: Don't know what interrupt to clear for console.
warn: instruction 'fxsave' unimplemented
warn: x86 cpuid: unknown family 0x8086
warn: instruction 'wbinvd' unimplemented
88964575000: system.pc.com_1.terminal: attach terminal 0
warn: instruction 'wbinvd' unimplemented
warn: x86 cpuid: unknown family 0x8086
hack: Assuming logical destinations are 1 << id.
warn: Tried to clear PCI interrupt 14
warn: Unknown mouse command 0xe1.
gem5.opt: build/X86/arch/x86/tlb.cc:305: Fault
X86ISA::TLB::translate(Request*, ThreadContext*, BaseTLB::Translation*,
BaseTLB::Mode, bool&, bool): Assertion `entry' failed.
Program aborted at cycle 47911747697000
Aborted
Here is the source code for hello.c and compile it with -lpthread and
-static
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define NUM_THREADS 2
void *PrintHello(void *threadid)
{
long tid;
tid = (long)threadid;
printf("Hello World! It's me, thread #%ld!\n", tid);
pthread_exit(NULL);
}
int main(int argc, char *argv[])
{
pthread_t threads[NUM_THREADS];
int rc;
long t;
for(t=0;t<NUM_THREADS;t++){
printf("In main: creating thread %ld\n", t);
rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
if (rc){
printf("ERROR; return code from pthread_create() is %d\n", rc);
exit(-1);
}
}
/* Last thing that main() should do */
pthread_exit(NULL);
}
Anybody can kindly give me some hint? Thanks very much.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users