Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 43031 invoked from network); 28 Feb 2011 18:18:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Feb 2011 18:18:03 -0000 Received: (qmail 17545 invoked by uid 500); 28 Feb 2011 18:18:02 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 17141 invoked by uid 500); 28 Feb 2011 18:18:00 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 16830 invoked by uid 99); 28 Feb 2011 18:18:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Feb 2011 18:18:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [94.23.41.186] (HELO mail.ardeek.com) (94.23.41.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Feb 2011 18:17:51 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ardeek.com (Postfix) with ESMTP id 0AE292B331 for ; Mon, 28 Feb 2011 19:17:31 +0100 (CET) Received: from mail.ardeek.com ([127.0.0.1]) by localhost (sheldon.ardeek.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VOZA+P+aGdjj for ; Mon, 28 Feb 2011 19:17:30 +0100 (CET) Received: from [192.168.1.22] (unknown [151.60.248.47]) by mail.ardeek.com (Postfix) with ESMTPA id 946CC2B297 for ; Mon, 28 Feb 2011 19:17:30 +0100 (CET) Message-ID: <4D6BE6B8.9040507@simonecaruso.com> Date: Mon, 28 Feb 2011 19:17:28 +0100 From: Simone Caruso User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Help with apr mutex References: <4D6BDAB9.9090907@simonecaruso.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 28/02/2011 18:53, thomas bonfort wrote: > a few things to try: > > * you should use APR_STATUS_IS_EBUSY(s) instead of ... == APR_EBUSY > * after creating the mutex, you might have to set permissions on it: > #ifdef AP_NEED_SET_MUTEX_PERMS > rc = unixd_set_global_mutex_perms(mutex); > if(rc != APR_SUCCESS) { > ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s, "Could not set > permissions on global parent mutex %s", mutex_name); > return rc; > } > #endif > > * I *think* that calling the lock functions twice from a same thread > (without unlocking first) can have undefined behavior, i.e. don't do > the lock() just after the trylock() call. > > regards, > thomas Thanks Thoms, i'm going to try your code! -- Simone Caruso IT Consultant +39 349 65 90 805 p.iva: 03045250838