[Libreoffice-commits] core.git: include/osl

Chris Sherlock chris.sherlock79 at gmail.com
Fri Jun 2 23:37:53 UTC 2017


 include/osl/file.h |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 261a2ad41c7478d0771c74825eca74939f7c55ee
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Fri Jun 2 20:29:40 2017 +1000

    osl: explain why in file.h a memory mapped file is "shared"
    
    The original comment reads:
    
        Don't know what the "shared" is supposed to mean there? Also,
        obviously this API can be used to map *part* of a file into
        memory, and different parts can be mapped separately even.
    
    That's because memory mapped files can be used as a form of IPC
    that allows multiple processes to share data.
    
    Change-Id: I3cb34fcdb0a93233b22ac888712f9c1d650b30ea
    Reviewed-on: https://gerrit.libreoffice.org/38348
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>

diff --git a/include/osl/file.h b/include/osl/file.h
index 73349572063c..01b6288ea0be 100644
--- a/include/osl/file.h
+++ b/include/osl/file.h
@@ -766,9 +766,8 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileSize(
 
 /** Map a shared file into memory.
 
-    Don't know what the "shared" is supposed to mean there? Also,
-    obviously this API can be used to map *part* of a file into
-    memory, and different parts can be mapped separately even.
+    Files can be mapped into memory to allow multiple processes to use
+    this memory-mapped file to share data.
 
     On Android, if the Handle refers to a file that is actually inside
     the app package (.apk zip archive), no new mapping is created,
@@ -790,8 +789,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_mapFile (
 
 /** Unmap a shared file from memory.
 
-    Ditto here, why do we need to mention "shared"?
-
     This function just won't work on Android in general where for
     (uncompressed) files inside the .apk, per SDK conventions in the
     /assets folder, osl_mapFile() returns a pointer to the file inside


More information about the Libreoffice-commits mailing list