Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 23562 invoked from network); 18 Aug 2009 18:39:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Aug 2009 18:39:11 -0000 Received: (qmail 75305 invoked by uid 500); 18 Aug 2009 18:39:30 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 75227 invoked by uid 500); 18 Aug 2009 18:39:30 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 75217 invoked by uid 99); 18 Aug 2009 18:39:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 18:39:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 18:39:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4EBC02388895; Tue, 18 Aug 2009 18:39:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r805534 - in /commons/sandbox/runtime/trunk/src/main/native/os: darwin/pmutex.c unix/pmutex.c unix/psema.c win32/psema.c Date: Tue, 18 Aug 2009 18:39:05 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090818183905.4EBC02388895@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Tue Aug 18 18:39:04 2009 New Revision: 805534 URL: http://svn.apache.org/viewvc?rev=805534&view=rev Log: Few more testcase observed fixes Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/pmutex.c commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c commons/sandbox/runtime/trunk/src/main/native/os/win32/psema.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/pmutex.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/pmutex.c?rev=805534&r1=805533&r2=805534&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/darwin/pmutex.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/pmutex.c Tue Aug 18 18:39:04 2009 @@ -36,7 +36,7 @@ static int mutex_cleanup(void *mutex, int type, unsigned int flags) { - if (type != ACR_DT_MUTEX) { + if (type == ACR_DT_MUTEX) { int rc = 0; acr_pmutex_t *m = (acr_pmutex_t *)mutex; if (m->filedes > 0 && m->locked) { @@ -58,7 +58,7 @@ free(m); return rc; } - return ACR_EINVAL; + return ACR_EBADF; } ACR_DECLARE(int) ACR_ProcMutexCreate(JNIEnv *_E, const acr_pchar_t *fname) Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c?rev=805534&r1=805533&r2=805534&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c Tue Aug 18 18:39:04 2009 @@ -50,7 +50,7 @@ free(m); return ACR_SUCCESS; } - return ACR_EINVAL; + return ACR_EBADF; } ACR_DECLARE(int) ACR_ProcMutexCreate(JNIEnv *_E, const acr_pchar_t *fname) Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c?rev=805534&r1=805533&r2=805534&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c Tue Aug 18 18:39:04 2009 @@ -39,7 +39,7 @@ static int semaphore_cleanup(void *sema, int type, unsigned int flags) { - if (type != ACR_DT_SEMAPHORE) { + if (type == ACR_DT_SEMAPHORE) { int rc = 0; acr_semaphore_t *s = (acr_semaphore_t *)sema; if (s->name[0]) @@ -51,7 +51,7 @@ free(s); return rc; } - return ACR_EINVAL; + return ACR_EBADF; } ACR_DECLARE(int) ACR_SemaphoreCreate(JNIEnv *_E, const acr_pchar_t *name, Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/psema.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/psema.c?rev=805534&r1=805533&r2=805534&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/win32/psema.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/win32/psema.c Tue Aug 18 18:39:04 2009 @@ -27,7 +27,7 @@ static int semaphore_cleanup(void *sema, int type, unsigned int flags) { - if (type != ACR_DT_SEMAPHORE) { + if (type == ACR_DT_SEMAPHORE) { if (!IS_INVALID_HANDLE(sema)) CloseHandle(sema); return ACR_SUCCESS;