Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ronmak
Beginner
63 Views

Thread Checker with non-Pthread and non-OpenMP mutexes

Is it possible to configure Thread Checker to recognize mutex calls that are not Pthread and not OpenMP? I'm trying to debug a massively parallel application that uses low-level mutexes. The app also goes in and out of kernel mode. When I instrument it with TC, I get a lot of false positives because it doesn't recognize our mutex lock and unlock calls.
0 Kudos
4 Replies
Dmitry_Vyukov
Valued Contributor I
63 Views

Hi ronmak,

You may check Intel Threading Blocks sources:

http://www.threadingbuildingblocks.org/file.php?fid=78

Their synchronization primitives contain lines like "ITT_NOTIFY(sync_acquired, &m);".

I do not actually know as to whether it works with Thread Checker or not, but I suspect that it must.

Mark_D_Intel
Employee
63 Views

Yes, it is possible to add API calls the code to inform Thread Checker about custom mutexes. Look at the help under "API Support"-> "User-Level Synchronization API".
ronmak
Beginner
63 Views

Thanks, Mark!

That's very helpful. I didn't know about that API because I'm on a Linux system and the online help appears to be only available on Windows systems.

We have a complex system with a variety of locks, so I'll have to see if I can successfully use the API calls to reduce the number of false positives reported by TC.

ronmak
Beginner
63 Views

Thanks, Dmitriy.

It turns out that the user-level synchronization API is probably what I'm looking for. Its write-up is hidden in the Windows documentation; I'm developing a Linux system.

Reply