Avoid using a C++ keyword as a structure member name.
authorRobert Haas <rhaas@postgresql.org>
Wed, 6 May 2015 02:41:03 +0000 (22:41 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 6 May 2015 02:41:03 +0000 (22:41 -0400)
Per request from Peter Eisentraut.

src/backend/access/transam/parallel.c
src/include/access/parallel.h

index 8ed7314b58c67021d0a20c7e1a3382d892f9d587..8d6a3606794425b080c97842a5b15301b65c7afb 100644 (file)
@@ -266,8 +266,9 @@ InitializeParallelDSM(ParallelContext *pcxt)
    else
    {
        pcxt->nworkers = 0;
-       pcxt->private = MemoryContextAlloc(TopMemoryContext, segsize);
-       pcxt->toc = shm_toc_create(PARALLEL_MAGIC, pcxt->private, segsize);
+       pcxt->private_memory = MemoryContextAlloc(TopMemoryContext, segsize);
+       pcxt->toc = shm_toc_create(PARALLEL_MAGIC, pcxt->private_memory,
+                                  segsize);
    }
 
    /* Initialize fixed-size state in shared memory. */
@@ -538,10 +539,10 @@ DestroyParallelContext(ParallelContext *pcxt)
     * If this parallel context is actually in backend-private memory rather
     * than shared memory, free that memory instead.
     */
-   if (pcxt->private != NULL)
+   if (pcxt->private_memory != NULL)
    {
-       pfree(pcxt->private);
-       pcxt->private = NULL;
+       pfree(pcxt->private_memory);
+       pcxt->private_memory = NULL;
    }
 
    /* Wait until the workers actually die. */
index 8274f841b685080dcfc83c195644cc51c4c91525..5f23f18f43bfdbd7c80d7d44215548b9e510e590 100644 (file)
@@ -41,7 +41,7 @@ typedef struct ParallelContext
    ErrorContextCallback *error_context_stack;
    shm_toc_estimator estimator;
    dsm_segment *seg;
-   void *private;
+   void *private_memory;
    shm_toc *toc;
    ParallelWorkerInfo *worker;
 } ParallelContext;