Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 79395 invoked from network); 23 Nov 2009 14:48:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Nov 2009 14:48:58 -0000 Received: (qmail 5435 invoked by uid 500); 23 Nov 2009 14:48:58 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 5337 invoked by uid 500); 23 Nov 2009 14:48:57 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 5327 invoked by uid 99); 23 Nov 2009 14:48:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 14:48:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pw0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 14:48:48 +0000 Received: by pwj15 with SMTP id 15so3760545pwj.3 for ; Mon, 23 Nov 2009 06:48:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Wl5tVMplL/P+hIyvpSW4MyWH03K5HAVaTpAOhZosNlY=; b=Y8iFS+Wt3BvWWR7eFVIkXzY1+L4MHtfaGMyEjHBeH8F6g4ag1+Kl5CAwIGPG7WAzCF jbcbfgB9KSgBSRCQa6R6nJQlfS+szAB7BQx4vzRHuoie77wQ+Wqb3yer970G2bZ5uLMB B7e9qZJ7N7HXt3rW8i2UrH/icfZ5b06VYatN8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=MQHzVlYvEvRZnqMF6+8gWpFY2n7PpFwqcg+2eIET+/RPIXAM2qsJkSNa+3m5+IVGya D/RhgwRnPeEwr+bSU40HSrHTdkTrWkBqOPw3VPylNnLm7LXgD/UeSVCADXoxDVoU3At6 +buoeY+U9UcXqguF5HzuJnIr8wgBxs6hrHCWk= MIME-Version: 1.0 Received: by 10.142.7.2 with SMTP id 2mr574655wfg.104.1258987707146; Mon, 23 Nov 2009 06:48:27 -0800 (PST) Date: Mon, 23 Nov 2009 09:48:27 -0500 Message-ID: Subject: apr_global_mutex_names(), similar to apr_proc_mutex_name()? From: Jeff Trawick To: APR Developer List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org APR_DECLARE(void) apr_global_mutex_names(apr_global_mutex_t *mutex, const char **proc_mech, const char **thread_mech) { *proc_mech = apr_proc_mutex_name(mutex->proc_mutex); *thread_mech = NULL; #if APR_HAS_THREADS if (mutex->thread_mutex) { *thread_mech = "pthread"; } #endif } I'd like to be able to retrieve the selected mechanism(s) from a global mutex like I can for a proc mutex, but somehow this is not a very satisfying interface. Also, Win32 and others wouldn't be able to #define apr_global_mutex_names apr_proc_mutex_names like they can for other global mutex functions. --/-- Since thread mechanisms aren't configurable/selectable, there is limited value in returning the name of the thread mechanism, so this could just be APR_DECLARE(const char *) apr_global_mutex_names(apr_global_mutex_t *mutex) { return apr_proc_mutex_name(mutex->proc_mutex); } and #define apr_global_mutex_names apr_proc_mutex_names --/-- Does anybody care? (Otherwise I'll go with the second choice and explain away the issue of the potential, non-selectable second mutex in the doc.)