yeah sure.. i knew this option... but, as far as i remember, last time i checked it not worked properly.. is it possible to use it with completely not related (by fork) processes ?...
anywayz the not-so-famous author of the article did not mention this option at all...
yeah right.. and how'd you treat WaitForMultipleObjects ? as far as i can see Wine does not solve this... at least i can't see how can you solve this effectively without kernel intervention...
The second article "Migrate Win32 C/C++ application to Linux on POWER, Part 2: Mutexes" worth nothing, since you can't use semaphore (SysV semaphore) instead of mutex. It seems that the author do not know/understand the very basic difference between binary semaphore and mutex - and the difference is that there is no owner for semaphore and there is always owner for mutex. This means that once mutex taken/locked, only the thread/process which holds the lock able to release the lock, and this is not true for binary semaphore... since it has no owner and any process/thread can unlock it.. I can even say that the example demonstrated in second article is dangerous.. Since it leads to misunderstanding and production of wrong/problematic code. At the moment there is no standard way to map Wind0ze inter-process mutex to Linux, this could probably be done using FUTEX API, but it is still changing, not standard and not well documented.
Regards,
Mike
yeah .. gotta check it .. as always there are different NPTL support in various kernels/glibc-s .. :)
thanks,
-M
yeah sure .. i knew this option ... but, as far as i remember, last time i checked it not worked properly .. is it possible to use it with completely not related (by fork) processes ? ...
...
anywayz the not-so-famous author of the article did not mention this option at all
before rushing to post you comments i warmly recommed you to complete your reading of the mentioned article
and in particular, please pay your attention to
Listing 17. Equivalent Linux sample code Process 1
and after that i might consider to discuss the issue with you.
-M
yeah right .. and how'd you treat WaitForMultipleObjects ? as far as i can see Wine does not solve this ... at least i can't see how can you solve this effectively without kernel intervention ...
The second article "Migrate Win32 C/C++ application to Linux on POWER, Part 2: Mutexes" worth nothing, since you can't use semaphore (SysV semaphore) instead of mutex. It seems that the author do not know/understand the very basic difference between binary semaphore and mutex - and the difference is that there is no owner for semaphore and there is always owner for mutex. This means that once mutex taken/locked, only the thread/process which holds the lock able to release the lock, and this is not true for binary semaphore ... since it has no owner and any process/thread can unlock it.. I can even say that the example demonstrated in second article is dangerous.. Since it leads to misunderstanding and production of wrong/problematic code. At the moment there is no standard way to map Wind0ze inter-process mutex to Linux, this could probably be done using FUTEX API, but it is still changing, not standard and not well documented.
Regards,
Mike