> I wrote a program ,which has two threads(A,B) and one mutex. This is the wrong mailing list for your question. This list is used for discussing the development of GCC, not how to use it or program threads. You might like to try posting to gcc-help.
Thanks, Ben