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