summaryrefslogtreecommitdiff
path: root/include/apr_mmap.h
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-07-02 23:40:37 +0000
committerBrian Pane <brianp@apache.org>2002-07-02 23:40:37 +0000
commitb1474aaee584d4eeb874cafb071a95cea126c3ee (patch)
treed6a90a71369901db36f260664ff6eac845031fca /include/apr_mmap.h
parentd6cea58ade5d073646bbded2ae32593ed2a1280f (diff)
downloadapr-b1474aaee584d4eeb874cafb071a95cea126c3ee.tar.gz
Added apr_file_setaside() function to move an apr_file_t from
one pool to another without a dup of the file descriptor. Also added apr_mmap_setaside() for consistency, per Cliff's suggestion git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_mmap.h')
-rw-r--r--include/apr_mmap.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/apr_mmap.h b/include/apr_mmap.h
index e54db8d58..202062e8d 100644
--- a/include/apr_mmap.h
+++ b/include/apr_mmap.h
@@ -163,8 +163,8 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **newmmap,
/**
* Duplicate the specified MMAP.
* @param new_mmap The structure to duplicate into.
- * @param old_mmap The file to duplicate.
- * @param p The pool to use for the new file.
+ * @param old_mmap The mmap to duplicate.
+ * @param p The pool to use for new_mmap.
* @param transfer_ownership Whether responsibility for destroying
* the memory-mapped segment is transferred from old_mmap to new_mmap
*/
@@ -173,6 +173,22 @@ APR_DECLARE(apr_status_t) apr_mmap_dup(apr_mmap_t **new_mmap,
apr_pool_t *p,
int transfer_ownership);
+#if defined(DOXYGEN)
+/**
+ * Transfer the specified MMAP to a different pool
+ * @param new_mmap The structure to duplicate into.
+ * @param old_mmap The file to transfer.
+ * @param p The pool to use for new_mmap.
+ * @remark After this call, old_mmap cannot be used
+ */
+APR_DECLARE(apr_status_t) apr_mmap_setaside(apr_mmap_t **new_mmap,
+ apr_mmap_t *old_mmap,
+ apr_pool_t *p);
+#else
+#define apr_mmap_setaside(new_mmap, old_mmap, p) apr_mmap_dup(new_mmap, old_mmap, p, 1)
+#endif /* DOXYGEN */
+
+
/**
* Remove a mmap'ed.
* @param mmap The mmap'ed file.