I am trying to use the m5threads library for running a multithreaded
program in gem5. I am also cross compiling my program. My host is "x64" and
target is "arm". I have some doubts:

1. After running the makefile it creates a directory libpthread.a in the
m5threads directory and gives me the following warning:

     :~/Desktop/m5thread/m5threads$ make
       gcc -O3 -static   -c -o pthread.o pthread.c
       pthread.c: In function ‘pthread_create’:
       pthread.c:256:3: *warning: implicit declaration of function ‘clone’
[-Wimplicit-function-declaration]*
*       clone(__pthread_trampoline, tcb->stack_start_addr,
CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHA*
*       ^*
       ar rv libpthread.a pthread.o
       ar: creating libpthread.a
       a - pthread.o
       *make: Warning: Archive 'libpthread.a' seems to have been created in
deterministic mode. '' will always be updated. Please consider passing the
U flag to ar to avoid the problem.*
       rm pthread.o

 Does the above warning needs to be considered? If so what should I do?

2. After making the m5threads, how to link my program to it?
    For example for using pthread library, I have to use "gcc -pthread".

3. Do I need to make any changes in my program to use the m5threads?


Thank you.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to