Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2afacfc

Browse files
committed
This patch properly sets the prototype for the on_shmem_exit and
on_proc_exit functions, and adjust all other related code to usethe proper types too.by Kurt Roeckx
1 parent7ac2f11 commit2afacfc

File tree

15 files changed

+45
-45
lines changed

15 files changed

+45
-45
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.126 2003/11/29 19:51:40 pgsql Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.127 2003/12/12 18:45:08 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -3086,7 +3086,7 @@ GetRedoRecPtr(void)
30863086
* This must be called ONCE during postmaster or standalone-backend shutdown
30873087
*/
30883088
void
3089-
ShutdownXLOG(void)
3089+
ShutdownXLOG(intcode,Datumarg)
30903090
{
30913091
ereport(LOG,
30923092
(errmsg("shutting down")));

‎src/backend/bootstrap/bootstrap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.169 2003/12/01 22:15:37 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.170 2003/12/12 18:45:08 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -478,8 +478,8 @@ BootstrapMain(int argc, char *argv[])
478478
proc_exit(0);/* done */
479479

480480
caseBS_XLOG_SHUTDOWN:
481-
ShutdownXLOG();
482-
DumpFreeSpaceMap();
481+
ShutdownXLOG(0,0);
482+
DumpFreeSpaceMap(0,0);
483483
proc_exit(0);/* done */
484484

485485
default:

‎src/backend/catalog/namespace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.59 2003/11/29 19:51:45 pgsql Exp $
16+
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.60 2003/12/12 18:45:08 petere Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -130,7 +130,7 @@ char *namespace_search_path = NULL;
130130
staticvoidrecomputeNamespacePath(void);
131131
staticvoidInitTempTableNamespace(void);
132132
staticvoidRemoveTempRelations(OidtempNamespaceId);
133-
staticvoidRemoveTempRelationsCallback(void);
133+
staticvoidRemoveTempRelationsCallback(intcode,Datumarg);
134134
staticvoidNamespaceCallback(Datumarg,Oidrelid);
135135

136136
/* These don't really need to appear in any header file */
@@ -1735,7 +1735,7 @@ RemoveTempRelations(Oid tempNamespaceId)
17351735
* Callback to remove temp relations at backend exit.
17361736
*/
17371737
staticvoid
1738-
RemoveTempRelationsCallback(void)
1738+
RemoveTempRelationsCallback(intcode,Datumarg)
17391739
{
17401740
if (OidIsValid(myTempNamespace))/* should always be true */
17411741
{

‎src/backend/commands/async.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.105 2003/11/29 19:51:47 pgsql Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.106 2003/12/12 18:45:08 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -120,7 +120,7 @@ boolTrace_notify = false;
120120

121121

122122
staticvoidAsync_UnlistenAll(void);
123-
staticvoidAsync_UnlistenOnExit(void);
123+
staticvoidAsync_UnlistenOnExit(intcode,Datumarg);
124124
staticvoidProcessIncomingNotify(void);
125125
staticvoidNotifyMyFrontEnd(char*relname,int32listenerPID);
126126
staticboolAsyncExistsPendingNotify(constchar*relname);
@@ -384,7 +384,7 @@ Async_UnlistenAll(void)
384384
*--------------------------------------------------------------
385385
*/
386386
staticvoid
387-
Async_UnlistenOnExit(void)
387+
Async_UnlistenOnExit(intcode,Datumarg)
388388
{
389389
/*
390390
* We need to start/commit a transaction for the unlisten, but if

‎src/backend/libpq/pqcomm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
3131
* Portions Copyright (c) 1994, Regents of the University of California
3232
*
33-
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.167 2003/11/29 19:51:49 pgsql Exp $
33+
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.168 2003/12/12 18:45:08 petere Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -88,7 +88,7 @@
8888
#include"storage/ipc.h"
8989

9090

91-
staticvoidpq_close(void);
91+
staticvoidpq_close(intcode,Datumarg);
9292

9393
#ifdefHAVE_UNIX_SOCKETS
9494
staticintLock_AF_UNIX(unsigned shortportNumber,char*unixSocketName);
@@ -145,7 +145,7 @@ pq_init(void)
145145
* --------------------------------
146146
*/
147147
staticvoid
148-
pq_close(void)
148+
pq_close(intcode,Datumarg)
149149
{
150150
if (MyProcPort!=NULL)
151151
{
@@ -183,7 +183,7 @@ static char sock_path[MAXPGPATH];
183183
*/
184184
#ifdefHAVE_UNIX_SOCKETS
185185
staticvoid
186-
StreamDoUnlink(void)
186+
StreamDoUnlink(intcode,Datumarg)
187187
{
188188
Assert(sock_path[0]);
189189
unlink(sock_path);

‎src/backend/port/ipc_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.11 2003/11/29 19:51:54 pgsql Exp $
24+
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.12 2003/12/12 18:45:09 petere Exp $
2525
*
2626
*-------------------------------------------------------------------------
2727
*/
@@ -62,7 +62,7 @@ boolassert_enabled = true;
6262

6363
staticstructONEXIT
6464
{
65-
void(*function) ();
65+
void(*function) (intcode,Datumarg);
6666
Datumarg;
6767
}on_proc_exit_list[MAX_ON_EXITS],on_shmem_exit_list[MAX_ON_EXITS];
6868

@@ -89,7 +89,7 @@ shmem_exit(int code)
8989
}
9090

9191
void
92-
on_shmem_exit(void (*function) (),Datumarg)
92+
on_shmem_exit(void (*function) (intcode,Datumarg),Datumarg)
9393
{
9494
if (on_shmem_exit_index >=MAX_ON_EXITS)
9595
elog(FATAL,"out of on_shmem_exit slots");

‎src/backend/storage/file/fd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.103 2003/11/29 19:51:56 pgsql Exp $
10+
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.104 2003/12/12 18:45:09 petere Exp $
1111
*
1212
* NOTES:
1313
*
@@ -205,7 +205,7 @@ static intFileAccess(File file);
205205
staticFilefileNameOpenFile(FileNamefileName,intfileFlags,intfileMode);
206206
staticchar*filepath(constchar*filename);
207207
staticlongpg_nofile(void);
208-
staticvoidAtProcExit_Files(void);
208+
staticvoidAtProcExit_Files(intcode,Datumarg);
209209
staticvoidCleanupTempFiles(boolisProcExit);
210210

211211

@@ -1141,7 +1141,7 @@ AtEOXact_Files(void)
11411141
* Here, we want to clean up *all* temp files including interXact ones.
11421142
*/
11431143
staticvoid
1144-
AtProcExit_Files(void)
1144+
AtProcExit_Files(intcode,Datumarg)
11451145
{
11461146
CleanupTempFiles(true);
11471147
}

‎src/backend/storage/freespace/freespace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.26 2003/11/29 19:51:56 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.27 2003/12/12 18:45:09 petere Exp $
1212
*
1313
*
1414
* NOTES:
@@ -717,7 +717,7 @@ PrintFreeSpaceMapStatistics(int elevel)
717717
* forma --- if anyone else is still accessing FSM, there's a problem.
718718
*/
719719
void
720-
DumpFreeSpaceMap(void)
720+
DumpFreeSpaceMap(intcode,Datumarg)
721721
{
722722
FILE*fp;
723723
charcachefilename[MAXPGPATH];

‎src/backend/storage/ipc/ipc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.86 2003/11/29 19:51:56 pgsql Exp $
16+
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.87 2003/12/12 18:45:09 petere Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -53,7 +53,7 @@ boolproc_exit_inprogress = false;
5353

5454
staticstructONEXIT
5555
{
56-
void(*function) ();
56+
void(*function) (intcode,Datumarg);
5757
Datumarg;
5858
}on_proc_exit_list[MAX_ON_EXITS],on_shmem_exit_list[MAX_ON_EXITS];
5959

@@ -146,7 +146,7 @@ shmem_exit(int code)
146146
* ----------------------------------------------------------------
147147
*/
148148
void
149-
on_proc_exit(void (*function) (),Datumarg)
149+
on_proc_exit(void (*function) (intcode,Datumarg),Datumarg)
150150
{
151151
if (on_proc_exit_index >=MAX_ON_EXITS)
152152
ereport(FATAL,
@@ -167,7 +167,7 @@ void
167167
* ----------------------------------------------------------------
168168
*/
169169
void
170-
on_shmem_exit(void (*function) (),Datumarg)
170+
on_shmem_exit(void (*function) (intcode,Datumarg),Datumarg)
171171
{
172172
if (on_shmem_exit_index >=MAX_ON_EXITS)
173173
ereport(FATAL,

‎src/backend/storage/lmgr/proc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.139 2003/12/01 21:59:25 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.140 2003/12/12 18:45:09 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -84,8 +84,8 @@ static volatile bool deadlock_timeout_active = false;
8484
staticstructtimevalstatement_fin_time;
8585

8686

87-
staticvoidProcKill(void);
88-
staticvoidDummyProcKill(void);
87+
staticvoidProcKill(intcode,Datumarg);
88+
staticvoidDummyProcKill(intcode,Datumarg);
8989
staticboolCheckStatementTimeout(void);
9090

9191

@@ -406,7 +406,7 @@ ProcReleaseLocks(bool isCommit)
406406
*this process. Release any of its held LW locks.
407407
*/
408408
staticvoid
409-
ProcKill(void)
409+
ProcKill(intcode,Datumarg)
410410
{
411411
/* use volatile pointer to prevent code rearrangement */
412412
volatilePROC_HDR*procglobal=ProcGlobal;
@@ -455,7 +455,7 @@ ProcKill(void)
455455
*as not-in-use.
456456
*/
457457
staticvoid
458-
DummyProcKill(void)
458+
DummyProcKill(intcode,Datumarg)
459459
{
460460
PGPROC*dummyproc;
461461

‎src/backend/storage/smgr/smgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.66 2003/11/29 19:51:57 pgsql Exp $
14+
* $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.67 2003/12/12 18:45:09 petere Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -24,7 +24,7 @@
2424
#include"utils/memutils.h"
2525

2626

27-
staticvoidsmgrshutdown(void);
27+
staticvoidsmgrshutdown(intcode,Datumarg);
2828

2929
typedefstructf_smgr
3030
{
@@ -142,7 +142,7 @@ smgrinit(void)
142142
}
143143

144144
staticvoid
145-
smgrshutdown(void)
145+
smgrshutdown(intcode,Datumarg)
146146
{
147147
inti;
148148

‎src/backend/utils/init/postinit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.130 2003/11/29 19:52:01 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.131 2003/12/12 18:45:09 petere Exp $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -43,7 +43,7 @@
4343

4444
staticvoidReverifyMyDatabase(constchar*name);
4545
staticvoidInitCommunication(void);
46-
staticvoidShutdownPostgres(void);
46+
staticvoidShutdownPostgres(intcode,Datumarg);
4747
staticboolThereIsAtLeastOneUser(void);
4848

4949

@@ -453,7 +453,7 @@ InitPostgres(const char *dbname, const char *username)
453453
* cleanup fails.
454454
*/
455455
staticvoid
456-
ShutdownPostgres(void)
456+
ShutdownPostgres(intcode,Datumarg)
457457
{
458458
/*
459459
* These operations are really just a minimal subset of

‎src/include/access/xlog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.45 2003/11/29 22:40:55 pgsql Exp $
9+
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.46 2003/12/12 18:45:10 petere Exp $
1010
*/
1111
#ifndefXLOG_H
1212
#defineXLOG_H
@@ -207,7 +207,7 @@ extern void XLOGShmemInit(void);
207207
externvoidXLOGPathInit(void);
208208
externvoidBootStrapXLOG(void);
209209
externvoidStartupXLOG(void);
210-
externvoidShutdownXLOG(void);
210+
externvoidShutdownXLOG(intcode,Datumarg);
211211
externvoidCreateCheckPoint(boolshutdown,boolforce);
212212
externvoidSetThisStartUpID(void);
213213
externvoidXLogPutNextOid(OidnextOid);

‎src/include/storage/freespace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.14 2003/11/29 22:41:13 pgsql Exp $
10+
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.15 2003/12/12 18:45:10 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -60,7 +60,7 @@ extern void FreeSpaceMapForgetDatabase(Oid dbid);
6060

6161
externvoidPrintFreeSpaceMapStatistics(intelevel);
6262

63-
externvoidDumpFreeSpaceMap(void);
63+
externvoidDumpFreeSpaceMap(intcode,Datumarg);
6464
externvoidLoadFreeSpaceMap(void);
6565

6666
#ifdefFREESPACE_DEBUG

‎src/include/storage/ipc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.62 2003/11/29 22:41:13 pgsql Exp $
14+
* $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.63 2003/12/12 18:45:10 petere Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -24,8 +24,8 @@ extern bool proc_exit_inprogress;
2424

2525
externvoidproc_exit(intcode);
2626
externvoidshmem_exit(intcode);
27-
externvoidon_proc_exit(void (*function) (),Datumarg);
28-
externvoidon_shmem_exit(void (*function) (),Datumarg);
27+
externvoidon_proc_exit(void (*function) (intcode,Datumarg),Datumarg);
28+
externvoidon_shmem_exit(void (*function) (intcode,Datumarg),Datumarg);
2929
externvoidon_exit_reset(void);
3030

3131
/* ipci.c */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp