[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    svn commit: r809485 - in /commons/sandbox/runtime/trunk/src/main:
From:       mturk () apache ! org
Date:       2009-08-31 7:41:18
Message-ID: 20090831074118.9128C23888D4 () eris ! apache ! org
[Download RAW message or body]

Author: mturk
Date: Mon Aug 31 07:41:17 2009
New Revision: 809485

URL: http://svn.apache.org/viewvc?rev=809485&view=rev
Log:
Add mmap stub

Added:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h   (with props)
    commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c   (with props)
    commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c   (with props)
Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DescriptorType.java
  commons/sandbox/runtime/trunk/src/main/native/Makefile.in
    commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
    commons/sandbox/runtime/trunk/src/main/native/include/acr_descriptor.h

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DescriptorType.java
                
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DescriptorType.java?rev=809485&r1=809484&r2=809485&view=diff
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DescriptorType.java \
                (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DescriptorType.java \
Mon Aug 31 07:41:17 2009 @@ -37,7 +37,7 @@
      * <br/>Defined integer value is: {@code 3}
      */
     GROUP(          3),
-    /** Global Mutex {@code Descriptor} type.
+    /** Global mutex {@code Descriptor} type.
      * <br/>Defined integer value is: {@code 4}
      */
     MUTEX(          4),
@@ -60,7 +60,12 @@
     /** Semaphore {@code Descriptor} type.
      * <br/>Defined integer value is: {@code 9}
      */
-    SEMAPHORE(      9);
+    SEMAPHORE(      9).
+    /** Memory mapped file {@code Descriptor} type.
+     * <br/>Defined integer value is: {@code 10}
+     */
+    MMAP(          10);
+
 
 
     private int value;

Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=809485&r1=809484&r2=809485&view=diff
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Mon Aug 31 07:41:17 \
2009 @@ -118,6 +118,7 @@
 	$(SRCDIR)/os/unix/ios.$(OBJ) \
 	$(SRCDIR)/os/unix/group.$(OBJ) \
 	$(SRCDIR)/os/unix/user.$(OBJ) \
+	$(SRCDIR)/os/unix/pmmap.$(OBJ) \
 	$(SRCDIR)/os/unix/pmutex.$(OBJ) \
 	$(SRCDIR)/os/unix/psema.$(OBJ) \
 	$(SRCDIR)/os/unix/pshm.$(OBJ) \
@@ -143,6 +144,7 @@
 	$(SRCDIR)/os/unix/ios.$(OBJ) \
 	$(SRCDIR)/os/unix/group.$(OBJ) \
 	$(SRCDIR)/os/unix/user.$(OBJ) \
+	$(SRCDIR)/os/unix/pmmap.$(OBJ) \
 	$(SRCDIR)/os/unix/pmutex.$(OBJ) \
 	$(SRCDIR)/os/unix/psema.$(OBJ) \
 	$(SRCDIR)/os/unix/pshm.$(OBJ) \
@@ -166,6 +168,7 @@
 	$(SRCDIR)/os/unix/ios.$(OBJ) \
 	$(SRCDIR)/os/unix/group.$(OBJ) \
 	$(SRCDIR)/os/unix/user.$(OBJ) \
+	$(SRCDIR)/os/unix/pmmap.$(OBJ) \
 	$(SRCDIR)/os/unix/psema.$(OBJ) \
 	$(SRCDIR)/os/unix/pshm.$(OBJ) \
 	$(SRCDIR)/os/unix/signals.$(OBJ) \
@@ -189,6 +192,7 @@
 	$(SRCDIR)/os/unix/ios.$(OBJ) \
 	$(SRCDIR)/os/unix/group.$(OBJ) \
 	$(SRCDIR)/os/unix/user.$(OBJ) \
+	$(SRCDIR)/os/unix/pmmap.$(OBJ) \
 	$(SRCDIR)/os/unix/pmutex.$(OBJ) \
 	$(SRCDIR)/os/unix/psema.$(OBJ) \
 	$(SRCDIR)/os/unix/signals.$(OBJ) \

Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in?rev=809485&r1=809484&r2=809485&view=diff
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in Mon Aug 31 07:41:17 \
2009 @@ -110,6 +110,7 @@
 	$(SRCDIR)/os/win32/platform.$(OBJ) \
 	$(SRCDIR)/os/win32/os.$(OBJ) \
 	$(SRCDIR)/os/win32/ios.$(OBJ) \
+	$(SRCDIR)/os/win32/pmmap.$(OBJ) \
 	$(SRCDIR)/os/win32/pmutex.$(OBJ) \
 	$(SRCDIR)/os/win32/psema.$(OBJ) \
 	$(SRCDIR)/os/win32/pshm.$(OBJ) \

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_descriptor.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_descriptor.h?rev=809485&r1=809484&r2=809485&view=diff
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_descriptor.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_descriptor.h Mon Aug 31 \
07:41:17 2009 @@ -41,6 +41,7 @@
 #define ACR_DT_SOCKET           0x00000007
 #define ACR_DT_DSO              0x00000008
 #define ACR_DT_SEMAPHORE        0x00000009
+#define ACR_DT_MMAP             0x0000000A
 #define ACR_DT_MASK             0x000000FF
 
 typedef enum {

Added: commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h?rev=809485&view=auto
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h Mon Aug 31 \
07:41:17 2009 @@ -0,0 +1,60 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACR_MMAP_H
+#define _ACR_MMAP_H
+
+#include "acr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file acr_mmap.h
+ * @brief
+ *
+ * ACR memory mapped files functions
+ *
+ */
+
+/**
+ * Private, platform-specific data struture representing a memory mapped file.
+ */
+typedef struct acr_mmap_t acr_mmap_t;
+
+
+/**
+ * Create and initialize a memory map that can be used to map the files
+ * in memory.
+ * @param env JNI environment to use.
+ * @param fname A file name to use.
+ */
+ACR_DECLARE(int) ACR_MmapCreate(JNIEnv *env, const acr_pchar_t *fname);
+
+
+/**
+ * Close the memory map.
+ * @param env JNI environment to use.
+ * @param map the mmap to close.
+ */
+ACR_DECLARE(int) ACR_MmapClose(JNIEnv *env, int map);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ACR_MMAP_H */

Propchange: commons/sandbox/runtime/trunk/src/main/native/include/acr_mmap.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c?rev=809485&view=auto
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c Mon Aug 31 07:41:17 \
2009 @@ -0,0 +1,31 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Posix mmap implementation.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_clazz.h"
+#include "acr_error.h"
+#include "acr_memory.h"
+#include "acr_string.h"
+#include "acr_descriptor.h"
+#include "acr_mmap.h"
+

Propchange: commons/sandbox/runtime/trunk/src/main/native/os/unix/pmmap.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c?rev=809485&view=auto
 ==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c Mon Aug 31 \
07:41:17 2009 @@ -0,0 +1,31 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Windows mmap implementation.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_clazz.h"
+#include "acr_error.h"
+#include "acr_memory.h"
+#include "acr_string.h"
+#include "acr_descriptor.h"
+#include "acr_mmap.h"
+

Propchange: commons/sandbox/runtime/trunk/src/main/native/os/win32/pmmap.c
------------------------------------------------------------------------------
    svn:eol-style = native


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic