Hi,

2013/9/12 Vadim <[email protected]>:
> Hi,
> I am investigating performance problems in binary compiled with mingw-w64,
> and libwinpthreads mutex comes at the top of my profile.
> Looking at the code, it appears as if mutexes are implemented using Windows
> semaphores?  Is this right?
Yes, that is right.
> Does anybody know why critical sections weren't used instead?
It is a while ago, but AFAIR this is reasoned by the fact that
pthread-mutexes have 3 different flavors.  First recursive,
thread-owned, and non-thread-owned.  First and second can
beimplemented by a critical section, the third (and standard-variant)
can't that easily.  Additional it is required - we didn't implement
this feature until now in winpthread - that there are named variants.

> Vadim

Kai

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to