Re: Application hangs with mutliple threads in atomicity functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Well, you should be able to step through these atomic functions and
see what they're doing: as they're at 100% cpu they aren't waiting on
mutexes.  So, attach your trusty debugger to the threads and
single-step to see what's going on.

Again I am not as familiar as I would like to be with the internals of gcc or libstdc++, but I understand that the atomic functions employ spin-locks for efficiency. If that is the case then wouldn't they spin perpetually and consume 100% CPU if dead-lock were to occur? This was just an assumption, but I will take your advice and step in with the debugger to verify.

Valgrind would almost certainly help you here, but Solaris isn't
supported.  Purify does support Solaris, but costs real money.

Great suggestion. I will try building it in Linux and take advantage of Valgrind.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux