Hello,

I was trying to run a simple pthread program on x86 SE mode.

Are m5threads the only way to do this ?

When I try to compile libpthread I get the below error

lap318@lap318-HP-Compaq-6730b-KE717AV ~/gem5/m5threads $ make
gcc -O3 -static    -c -o pthread.o pthread.c
pthread.c:40:2: error: #error "spinlock routines not available for your
arch!\n"
 #error "spinlock routines not available for your arch!\n"
  ^
In file included from pthread.c:43:0:
tls_defs.h:220:4: error: #error "No TLS defs for your architecture"
   #error "No TLS defs for your architecture"
    ^
pthread.c: In function ‘populate_thread_block_info’:
pthread.c:58:37: error: ‘tcbhead_t’ undeclared (first use in this function)
 #define NPTL_TCBHEAD_T_SIZE (sizeof(tcbhead_t))
                                     ^
pthread.c:115:67: note: in expansion of macro ‘NPTL_TCBHEAD_T_SIZE’
 size_t sz = sizeof(pthread_tcb_t) + thread_block_info.tls_memsz +
NPTL_TCBHEAD_T_SIZE + thread_block_info.stack_guard_size + CHILD_STACK_SIZE;
                                                                   ^
pthread.c:58:37: note: each undeclared identifier is reported only once for
each function it appears in
 #define NPTL_TCBHEAD_T_SIZE (sizeof(tcbhead_t))
                                     ^
pthread.c:115:67: note: in expansion of macro ‘NPTL_TCBHEAD_T_SIZE’
 size_t sz = sizeof(pthread_tcb_t) + thread_block_info.tls_memsz +
NPTL_TCBHEAD_T_SIZE + thread_block_info.stack_guard_size + CHILD_STACK_SIZE;
                                                                   ^
make: *** [pthread.o] Error 1
lap318@lap318-HP-Compaq-6730b-KE717AV ~/gem5/m5threads $


Is there something I am missing ? May be some missing path variable or some
minor modification of the code somewhere. Because I have the files
spinlock_x86.h and tls_defs.h.

Regards
Nidhi
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to