commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
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 GMT
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;



Mime
View raw message