mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
This patch properly sets the prototype for the on_shmem_exit and
on_proc_exit functions, and adjust all other related code to use the proper types too. by Kurt Roeckx
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.103 2003/11/29 19:51:56 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.104 2003/12/12 18:45:09 petere Exp $
|
||||
*
|
||||
* NOTES:
|
||||
*
|
||||
@@ -205,7 +205,7 @@ static int FileAccess(File file);
|
||||
static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
|
||||
static char *filepath(const char *filename);
|
||||
static long pg_nofile(void);
|
||||
static void AtProcExit_Files(void);
|
||||
static void AtProcExit_Files(int code, Datum arg);
|
||||
static void CleanupTempFiles(bool isProcExit);
|
||||
|
||||
|
||||
@@ -1141,7 +1141,7 @@ AtEOXact_Files(void)
|
||||
* Here, we want to clean up *all* temp files including interXact ones.
|
||||
*/
|
||||
static void
|
||||
AtProcExit_Files(void)
|
||||
AtProcExit_Files(int code, Datum arg)
|
||||
{
|
||||
CleanupTempFiles(true);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.26 2003/11/29 19:51:56 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.27 2003/12/12 18:45:09 petere Exp $
|
||||
*
|
||||
*
|
||||
* NOTES:
|
||||
@@ -717,7 +717,7 @@ PrintFreeSpaceMapStatistics(int elevel)
|
||||
* forma --- if anyone else is still accessing FSM, there's a problem.
|
||||
*/
|
||||
void
|
||||
DumpFreeSpaceMap(void)
|
||||
DumpFreeSpaceMap(int code, Datum arg)
|
||||
{
|
||||
FILE *fp;
|
||||
char cachefilename[MAXPGPATH];
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.86 2003/11/29 19:51:56 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.87 2003/12/12 18:45:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ bool proc_exit_inprogress = false;
|
||||
|
||||
static struct ONEXIT
|
||||
{
|
||||
void (*function) ();
|
||||
void (*function) (int code, Datum arg);
|
||||
Datum arg;
|
||||
} on_proc_exit_list[MAX_ON_EXITS], on_shmem_exit_list[MAX_ON_EXITS];
|
||||
|
||||
@@ -146,7 +146,7 @@ shmem_exit(int code)
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
on_proc_exit(void (*function) (), Datum arg)
|
||||
on_proc_exit(void (*function) (int code, Datum arg), Datum arg)
|
||||
{
|
||||
if (on_proc_exit_index >= MAX_ON_EXITS)
|
||||
ereport(FATAL,
|
||||
@@ -167,7 +167,7 @@ void
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
on_shmem_exit(void (*function) (), Datum arg)
|
||||
on_shmem_exit(void (*function) (int code, Datum arg), Datum arg)
|
||||
{
|
||||
if (on_shmem_exit_index >= MAX_ON_EXITS)
|
||||
ereport(FATAL,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.139 2003/12/01 21:59:25 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.140 2003/12/12 18:45:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -84,8 +84,8 @@ static volatile bool deadlock_timeout_active = false;
|
||||
static struct timeval statement_fin_time;
|
||||
|
||||
|
||||
static void ProcKill(void);
|
||||
static void DummyProcKill(void);
|
||||
static void ProcKill(int code, Datum arg);
|
||||
static void DummyProcKill(int code, Datum arg);
|
||||
static bool CheckStatementTimeout(void);
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ ProcReleaseLocks(bool isCommit)
|
||||
* this process. Release any of its held LW locks.
|
||||
*/
|
||||
static void
|
||||
ProcKill(void)
|
||||
ProcKill(int code, Datum arg)
|
||||
{
|
||||
/* use volatile pointer to prevent code rearrangement */
|
||||
volatile PROC_HDR *procglobal = ProcGlobal;
|
||||
@@ -455,7 +455,7 @@ ProcKill(void)
|
||||
* as not-in-use.
|
||||
*/
|
||||
static void
|
||||
DummyProcKill(void)
|
||||
DummyProcKill(int code, Datum arg)
|
||||
{
|
||||
PGPROC *dummyproc;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.66 2003/11/29 19:51:57 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.67 2003/12/12 18:45:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "utils/memutils.h"
|
||||
|
||||
|
||||
static void smgrshutdown(void);
|
||||
static void smgrshutdown(int code, Datum arg);
|
||||
|
||||
typedef struct f_smgr
|
||||
{
|
||||
@@ -142,7 +142,7 @@ smgrinit(void)
|
||||
}
|
||||
|
||||
static void
|
||||
smgrshutdown(void)
|
||||
smgrshutdown(int code, Datum arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user