summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/dsm.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-10-30 11:35:55 -0400
committerRobert Haas <rhaas@postgresql.org>2014-10-30 11:44:22 -0400
commit1c49dae165bcee69bf3327d6ae20271d82cdf6bf (patch)
treefa7ebd12791923df8a237d615c960b28507a3596 /src/backend/storage/ipc/dsm.c
parentae3eb9b8ef5638610da05038e40229d4f4e5c1fd (diff)
"Pin", rather than "keep", dynamic shared memory mappings and segments.
Nobody seemed concerned about this naming when it originally went in, but there's a pending patch that implements the opposite of dsm_keep_mapping, and the term "unkeep" was judged unpalatable. "unpin" has existing precedent in the PostgreSQL code base, and the English language, so use this terminology instead. Per discussion, back-patch to 9.4.
Diffstat (limited to 'src/backend/storage/ipc/dsm.c')
-rw-r--r--src/backend/storage/ipc/dsm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c
index a5c008463a9..7ce45caaf9b 100644
--- a/src/backend/storage/ipc/dsm.c
+++ b/src/backend/storage/ipc/dsm.c
@@ -8,7 +8,7 @@
* facilities provided by dsm_impl.h and dsm_impl.c, mappings and segments
* created using this module will be cleaned up automatically. Mappings
* will be removed when the resource owner under which they were created
- * is cleaned up, unless dsm_keep_mapping() is used, in which case they
+ * is cleaned up, unless dsm_pin_mapping() is used, in which case they
* have session lifespan. Segments will be removed when there are no
* remaining mappings, or at postmaster shutdown in any case. After a
* hard postmaster crash, remaining segments will be removed, if they
@@ -786,7 +786,7 @@ dsm_detach(dsm_segment *seg)
* only.
*/
void
-dsm_keep_mapping(dsm_segment *seg)
+dsm_pin_mapping(dsm_segment *seg)
{
if (seg->resowner != NULL)
{
@@ -804,11 +804,11 @@ dsm_keep_mapping(dsm_segment *seg)
*
* Note that this function does not arrange for the current process to
* keep the segment mapped indefinitely; if that behavior is desired,
- * dsm_keep_mapping() should be used from each process that needs to
+ * dsm_pin_mapping() should be used from each process that needs to
* retain the mapping.
*/
void
-dsm_keep_segment(dsm_segment *seg)
+dsm_pin_segment(dsm_segment *seg)
{
/*
* Bump reference count for this segment in shared memory. This will
@@ -819,7 +819,7 @@ dsm_keep_segment(dsm_segment *seg)
dsm_control->item[seg->control_slot].refcnt++;
LWLockRelease(DynamicSharedMemoryControlLock);
- dsm_impl_keep_segment(seg->handle, seg->impl_private);
+ dsm_impl_pin_segment(seg->handle, seg->impl_private);
}
/*