commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r811354 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/SharedMemory.java java/org/apache/commons/runtime/io/MemoryMapProvider.java native/include/arch/unix/acr_arch.h native/os/win32/temps.c
Date Fri, 04 Sep 2009 11:42:25 GMT
Author: mturk
Date: Fri Sep  4 11:42:25 2009
New Revision: 811354

URL: http://svn.apache.org/viewvc?rev=811354&view=rev
Log:
Some inor tweeks

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/MemoryMapProvider.java
    commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h
    commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java?rev=811354&r1=811353&r2=811354&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
Fri Sep  4 11:42:25 2009
@@ -272,7 +272,7 @@
     private static native Pointer map1(Descriptor shm, long off, long size)
         throws IOException, IndexOutOfBoundsException;
     /**
-     * Retrieve new @code Pointer}address of the shared memory segment.
+     * Retrieve new {@code Pointer} address of the shared memory segment.
      * <p>
      * <b>Warning:</b><br/>This address is only usable within the callers
address
      * space, since this API does not guarantee that other attaching

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/MemoryMapProvider.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/MemoryMapProvider.java?rev=811354&r1=811353&r2=811354&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/MemoryMapProvider.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/MemoryMapProvider.java
Fri Sep  4 11:42:25 2009
@@ -31,7 +31,7 @@
  * <p>
  * </p>
  */
-public class MemoryMapProvider implements java.io.Closeable
+public final class MemoryMapProvider implements java.io.Closeable
 {
     /*
      * Reference to the OS memory mapped file descriptor

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h?rev=811354&r1=811353&r2=811354&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h Fri Sep  4
11:42:25 2009
@@ -28,8 +28,12 @@
 #define ACR_FORCEINLINE __inline
 #else
 #define ACR_INLINE      inline
+#if defined(__GNUC__)
+#define ACR_FORCEINLINE __attribute__((always_inline)) __inline__
+#else
 #define ACR_FORCEINLINE inline
 #endif
+#endif
 
 #if CC_SIZEOF_LONG == 8
 #define ACR_INT64_T_FMT          "ld"

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c?rev=811354&r1=811353&r2=811354&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c Fri Sep  4 11:42:25 2009
@@ -120,10 +120,10 @@
     for (;;) {
         fh = CreateFileW(path,
                          GENERIC_READ | GENERIC_WRITE,
-                         0,
+                         0,     /* Do not share the temporary file */
                          &sa,
                          CREATE_NEW,
-                         flags,
+                         flags | FILE_ATTRIBUTE_TEMPORARY,
                          NULL);
         if (fh == INVALID_HANDLE_VALUE) {
             if (GetLastError() != ERROR_FILE_EXISTS)
@@ -250,7 +250,7 @@
                                   const wchar_t *prefix, int preserve)
 {
     int     rc;
-    DWORD   ff = preserve ? FILE_ATTRIBUTE_NORMAL : FILE_FLAG_DELETE_ON_CLOSE;
+    DWORD   ff = preserve ? 0 : FILE_FLAG_DELETE_ON_CLOSE;
     HANDLE  fd;
     wchar_t name[ACR_MBUFF_SIZ] = L"";
     acr_file_t *fp;



Mime
View raw message