From 9d5b72830b53b118550a66b2a26b7897a1a402db Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 17 Mar 2008 11:50:27 +0000 Subject: [PATCH] Move ProcState definition into sinvaladt.c from sinvaladt.h, since it's not needed anywhere after my previous patch. Noticed by Tom Lane. Also, remove #include from sinval.c. --- src/backend/storage/ipc/sinval.c | 2 -- src/backend/storage/ipc/sinvaladt.c | 7 +++++++ src/include/storage/sinvaladt.h | 25 +++++++------------------ 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index a0c0b17cc9..e151e3fab5 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -14,8 +14,6 @@ */ #include "postgres.h" -#include - #include "access/xact.h" #include "commands/async.h" #include "miscadmin.h" diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 2d6f52eb90..0ed5927150 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -64,6 +64,13 @@ #define MAXNUMMESSAGES 4096 #define MSGNUMWRAPAROUND (MAXNUMMESSAGES * 4096) +/* Per-backend state in shared invalidation structure */ +typedef struct ProcState +{ + /* nextMsgNum is -1 in an inactive ProcState array entry. */ + int nextMsgNum; /* next message number to read, or -1 */ + bool resetState; /* true, if backend has to reset its state */ +} ProcState; /* Shared cache invalidation memory segment */ typedef struct SISeg diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index 25fddae6a0..72d68c0ba9 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -3,6 +3,13 @@ * sinvaladt.h * POSTGRES shared cache invalidation segment definitions. * + * The shared cache invalidation manager is responsible for transmitting + * invalidation messages between backends. Any message sent by any backend + * must be delivered to all already-running backends before it can be + * forgotten. + * + * The struct type SharedInvalidationMessage, defining the contents of + * a single message, is defined in sinval.h. * * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California @@ -16,24 +23,6 @@ #include "storage/sinval.h" -/* - * The shared cache invalidation manager is responsible for transmitting - * invalidation messages between backends. Any message sent by any backend - * must be delivered to all already-running backends before it can be - * forgotten. - * - * The struct type SharedInvalidationMessage, defining the contents of - * a single message, is defined in sinval.h. - */ - -/* Per-backend state in shared invalidation structure */ -typedef struct ProcState -{ - /* nextMsgNum is -1 in an inactive ProcState array entry. */ - int nextMsgNum; /* next message number to read, or -1 */ - bool resetState; /* true, if backend has to reset its state */ -} ProcState; - /* * prototypes for functions in sinvaladt.c -- 2.39.5