The Alpha ISA has a load locked and a store conditional instruction
which we support. Again I don't know exactly what you're doing to
create your threads, but you need to make sure that their cpu/thread
ids are unique. Are you scheduling each thread on it's own cpu or are
they moving around?
Ali
On Jun 15, 2007, at 1:30 PM, Jiayuan Meng wrote:
Hey all,
By using the --trace-flags=Exec debug tool, I found that there is a
race condition in the malloc function in my multithreaded program.
However, when looking into the malloc.c in the glibc, it said it is
a thread-safe version. I also noticed that in malloc/arena.c, it
uses mutex_lock(), which seems to be a spinlock. This may still be
problematic if several threads are accessing the lock simultaneously.
So, what kind of synchronization support does M5 have in SE mode?
Does it have store-conditional or test-and-set instructions or I'll
have to add one myself?
Thanks!
Jiayuan
_______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users