mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-04 00:02:52 -05:00 
			
		
		
		
	Mop up from caddr_t -> Datum conversion to make things extra type safe
This commit is contained in:
		
							parent
							
								
									416bbbffa3
								
							
						
					
					
						commit
						65577dc83e
					
				@ -29,7 +29,7 @@
 | 
			
		||||
 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
 | 
			
		||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
			
		||||
 *
 | 
			
		||||
 *	$Id: pqcomm.c,v 1.102 2000/10/02 19:42:46 petere Exp $
 | 
			
		||||
 *	$Id: pqcomm.c,v 1.103 2000/10/02 21:45:31 petere Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@ -152,7 +152,7 @@ static char sock_path[MAXPGPATH];
 | 
			
		||||
 * If a Unix socket is used for communication, explicitly close it.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
StreamDoUnlink()
 | 
			
		||||
StreamDoUnlink(void)
 | 
			
		||||
{
 | 
			
		||||
	Assert(sock_path[0]);
 | 
			
		||||
	unlink(sock_path);
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * IDENTIFICATION
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.33 2000/10/02 19:42:48 petere Exp $
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.34 2000/10/02 21:45:32 petere Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@ -27,7 +27,7 @@ SISeg	   *shmInvalBuffer;
 | 
			
		||||
 | 
			
		||||
static void SISegmentAttach(IpcMemoryId shmid);
 | 
			
		||||
static void SISegInit(SISeg *segP, int maxBackends);
 | 
			
		||||
static void CleanupInvalidationState(int status, SISeg *segP);
 | 
			
		||||
static void CleanupInvalidationState(int status, Datum arg);
 | 
			
		||||
static void SISetProcStateInvalid(SISeg *segP);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@ -200,11 +200,14 @@ SIBackendInit(SISeg *segP)
 | 
			
		||||
 *
 | 
			
		||||
 * This function is called via on_shmem_exit() during backend shutdown,
 | 
			
		||||
 * so the caller has NOT acquired the lock for us.
 | 
			
		||||
 *
 | 
			
		||||
 * arg is really of type "SISeg*".
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
CleanupInvalidationState(int status,
 | 
			
		||||
						 SISeg *segP)
 | 
			
		||||
CleanupInvalidationState(int status, Datum arg)
 | 
			
		||||
{
 | 
			
		||||
	SISeg *segP = (void*) DatumGetPointer(arg);
 | 
			
		||||
 | 
			
		||||
	Assert(PointerIsValid(segP));
 | 
			
		||||
 | 
			
		||||
	SpinAcquire(SInvalLock);
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * IDENTIFICATION
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/02 19:42:48 petere Exp $
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/02 21:45:32 petere Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@ -47,7 +47,7 @@
 | 
			
		||||
 *		This is so that we can support more backends. (system-wide semaphore
 | 
			
		||||
 *		sets run out pretty fast.)				  -ay 4/95
 | 
			
		||||
 *
 | 
			
		||||
 * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/02 19:42:48 petere Exp $
 | 
			
		||||
 * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/02 21:45:32 petere Exp $
 | 
			
		||||
 */
 | 
			
		||||
#include "postgres.h"
 | 
			
		||||
 | 
			
		||||
@ -88,7 +88,7 @@ static PROC_HDR *ProcGlobal = NULL;
 | 
			
		||||
 | 
			
		||||
PROC	   *MyProc = NULL;
 | 
			
		||||
 | 
			
		||||
static void ProcKill(int exitStatus, int pid);
 | 
			
		||||
static void ProcKill(int exitStatus, Datum pid);
 | 
			
		||||
static void ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum);
 | 
			
		||||
static void ProcFreeSem(IpcSemaphoreKey semKey, int semNum);
 | 
			
		||||
 | 
			
		||||
@ -396,7 +396,7 @@ ProcRemove(int pid)
 | 
			
		||||
 *		this process. Release any of its held spin locks.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
ProcKill(int exitStatus, int pid)
 | 
			
		||||
ProcKill(int exitStatus, Datum pid)
 | 
			
		||||
{
 | 
			
		||||
	PROC	   *proc;
 | 
			
		||||
	SHMEM_OFFSET location;
 | 
			
		||||
@ -416,7 +416,7 @@ ProcKill(int exitStatus, int pid)
 | 
			
		||||
 | 
			
		||||
	proc = (PROC *) MAKE_PTR(location);
 | 
			
		||||
 | 
			
		||||
	Assert(proc == MyProc || pid != MyProcPid);
 | 
			
		||||
	Assert(proc == MyProc || (int)pid != MyProcPid);
 | 
			
		||||
 | 
			
		||||
	MyProc = NULL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * IDENTIFICATION
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.38 2000/10/02 19:42:52 petere Exp $
 | 
			
		||||
 *	  $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.39 2000/10/02 21:45:33 petere Exp $
 | 
			
		||||
 *
 | 
			
		||||
 *-------------------------------------------------------------------------
 | 
			
		||||
 */
 | 
			
		||||
@ -19,7 +19,7 @@
 | 
			
		||||
 | 
			
		||||
#include "storage/smgr.h"
 | 
			
		||||
 | 
			
		||||
static void smgrshutdown(int dummy);
 | 
			
		||||
static void smgrshutdown(void);
 | 
			
		||||
 | 
			
		||||
typedef struct f_smgr
 | 
			
		||||
{
 | 
			
		||||
@ -118,7 +118,7 @@ smgrinit()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
smgrshutdown(int dummy)
 | 
			
		||||
smgrshutdown(void)
 | 
			
		||||
{
 | 
			
		||||
	int			i;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user