Re: mutex lock competing -one side always wins

2008-01-21 Thread Ben Elliston
> 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

mutex lock competing -one side always wins

2008-01-21 Thread Toshiyuki Okamoto
I wrote a program ,which has two threads(A,B) and one mutex. Thread A :loop (mutex_lock -> some process ->mutex_unlock ) Thread B :mutex_lock when needed -> some process ->mutex_unlock I expected that Thread B can get mutex_lock when thread A unlock,but Thread B don't get any locks .gcc is 4.1.1. /