in reply to OT: Locking and syncing mechanisms available on *nix.
My gut feeling on this one, BrowserUK, is that you may just be stuck with what Unix/Linux does have to offer.
As the Wine implementation team observed (they’ve created a fairly-complete Win32 emulation layer for Linux; see http://www.winehq.org), the Win32 API is much more rich and expressive in this area than the one available in Unix and Linux. (What they came up with is a rather-awful implementation using a wineserver process and sockets.) In making this statement, I am not passing any judgment. This is likely to be one of those situations where “you gotta dance with the one that brung ya,” and diplomatically pretend that it doesn’t smell quite as bad as it actually does. If a mutex is needed in a case where both taste and reason insist that it should not be so, well, “c’est la guerre, n’est ce pas?”