| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | RE: Inter-Process Mutexes |
| Date: | Wed, 6 Sep 2006 11:26:57 +0100 |
| Message-ID: | <00c701c6d19e$fb2d0f30$a501a8c0@CAM.ARTIMI.COM> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 11 |
| In-Reply-To: | <20060904082849.GB4461@implementation.labri.fr> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id k86ARAhC023847 |
On 06 September 2006 10:58, Samuel Thibault wrote:
> Hi,
>
> Drake Baker, le Mon 04 Sep 2006 01:49:25 -0500, a crit :
>> I have seen conflicting information on the web concerning inter-process
>> mutexes in CYGWIN. I have seen outright statements that it is not
>> supported, and I have seen statements that ALL mutexes are inter-process by
>> default. Obviously, only one statement is currently correct.
>
> Both are true :)
>
> Windows provides inter-process mutexes (you just need to give a name to
> CreateMutex ; every process that give the same name will get the same
> mutex). But cygwin doesn't provide a pthread interface for it. PTW.
The underlying pthread implementation uses win32 CreateSemaphore, as it happens. See pthread_mutex::pthread_mutex in thread.cc. The pthread functions are not supposed to be inter-process, they are within-process only. As Václav pointed out, the answer is to set CYGWIN=server in the environment and use the SysV IPC functions.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |