head	1.14;
access;
symbols
	release_4_2:1.14
	aix_ok:1.13
	Version_2_1:1.8
	old_buffer_manager:1.7
	Version_2:1.5
	C_Demo_1:1.4;
locks; strict;
comment	@ * @;


1.14
date	94.02.07.11.43.43;	author aoki;	state Exp;
branches;
next	1.13;

1.13
date	91.08.29.23.49.37;	author mer;	state Exp;
branches;
next	1.12;

1.12
date	91.07.24.07.48.13;	author mao;	state Exp;
branches;
next	1.11;

1.11
date	91.07.22.22.21.32;	author mao;	state Exp;
branches;
next	1.10;

1.10
date	91.07.22.14.25.52;	author mer;	state Exp;
branches;
next	1.9;

1.9
date	91.06.10.20.57.07;	author kemnitz;	state Exp;
branches;
next	1.8;

1.8
date	91.01.18.21.37.00;	author hong;	state Exp;
branches;
next	1.7;

1.7
date	90.10.16.23.31.38;	author hong;	state Exp;
branches;
next	1.6;

1.6
date	90.08.17.08.53.21;	author cimarron;	state Exp;
branches;
next	1.5;

1.5
date	90.03.01.15.40.08;	author cimarron;	state Version_2;
branches;
next	1.4;

1.4
date	89.09.05.17.06.58;	author mao;	state C_Demo_1;
branches;
next	1.3;

1.3
date	89.04.12.19.54.29;	author dillon;	state Exp;
branches;
next	1.2;

1.2
date	89.03.22.18.58.20;	author hirohama;	state Stab;
branches;
next	1.1;

1.1
date	89.01.17.05.54.13;	author cimarron;	state Exp;
branches;
next	;


desc
@@


1.14
log
@ipc.h protos require ipci.h but someone included them backwards all over
the storage directory..
@
text
@/*
 * ipci.h --
 *	POSTGRES inter-process communication initialization definitions.
 *
 * Identification:
 *	$Header: /import/faerie/faerie/aoki/postgres/src/backend/storage/RCS/ipci.h,v 1.13 1991/08/29 23:49:37 mer Exp aoki $
 */

#ifndef	IPCIIncluded	/* Include this file only once */
#define IPCIIncluded	1

#include <sys/types.h>
#ifndef	_IPC_
#define _IPC_
#include <sys/ipc.h>
#endif

#include "tmp/c.h"

typedef uint32	IPCKey;

#include "storage/ipc.h"

#define PrivateIPCKey	IPC_PRIVATE
#define DefaultIPCKey	17317

/*
 * Note:
 *	These must not hash to DefaultIPCKey or PrivateIPCKey.
 */
#define SystemPortAddressGetIPCKey(address) \
	(28597 * (address) + 17491)

#define IPCKeyGetBufferMemoryKey(key) \
	((key == PrivateIPCKey) ? key : 1 + (key))
#define IPCKeyGetBufferSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 2 + (key))

#define IPCKeyGetLockTableMemoryKey(key) \
	((key == PrivateIPCKey) ? key : 3 + (key))
#define IPCKeyGetLockTableSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 4 + (key))
#define IPCKeyGetLockTableSemaphoreBlockKey(key) \
	((key == PrivateIPCKey) ? key : 5 + (key))
#define IPCKeyGetSIBufferMemorySemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 6 + (key))
#define IPCKeyGetSIBufferMemoryBlock(key) \
	((key == PrivateIPCKey) ? key : 7 + (key))

#define IPCKeyGetExecutorSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 8 + (key))
#define IPCKeyGetExecutorSharedMemoryKey(key) \
	((key == PrivateIPCKey) ? key : 9 + (key))

#define IPCKeyGetSLockSharedMemoryKey(key) \
	((key == PrivateIPCKey) ? key : 10 + (key))

#define IPCKeyGetSpinLockSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 11 + (key))
#define IPCKeyGetWaitIOSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 12 + (key))

#ifdef SONY_JUKEBOX
#define IPCKeyGetSJWaitSemaphoreKey(key) \
	((key == PrivateIPCKey) ? key : 13 + (key))
#endif /* SONY_JUKEBOX */

/* --------------------------
 * NOTE: This macro must always give the highest numbered key as every backend
 * process forked off by the postmaster will be trying to acquire a semaphore
 * with a unique key value starting at key+14 and incrementing up.  Each
 * backend uses the current key value then increments it by one.
 * --------------------------
 */
#define IPCGetProcessSemaphoreInitKey(key) \
	((key == PrivateIPCKey) ? key : 14 + (key))

/*
 * SystemPortAddressCreateMemoryKey --
 *	Returns a memory key given a port address.
 */
extern
IPCKey
SystemPortAddressCreateMemoryKey ARGS((
	SystemPortAddress	address
));

/*
 * CreateSharedMemoryAndSemaphores --
 *	Creates and initializes shared memory and semaphores.
 */
extern
void
CreateSharedMemoryAndSemaphores ARGS((
	IPCKey	key
));

/*
 * AttachSharedMemoryAndSemaphores --
 *	Attachs existant shared memory and semaphores.
 */
extern
void
AttachSharedMemoryAndSemaphores ARGS((
	IPCKey	key
));

#endif	/* !defined(IPCIIncluded) */
@


1.13
log
@purge old lmgr code
@
text
@d6 1
a6 1
 *	$Header: /users/mer/postgres/src/lib/H/storage/RCS/ipci.h,v 1.12 1991/07/24 07:48:13 mao Exp mer $
d20 2
a23 2
typedef uint32	IPCKey;

@


1.12
log
@add main memory storage manager, clean up spin lock numbering
@
text
@d6 1
a6 1
 *	$Header: /users/mao/postgres/src/lib/H/storage/RCS/ipci.h,v 1.11 1991/07/22 22:21:32 mao Exp mao $
a20 1
#include "storage/pladt.h"
a76 3

extern LockTableId	PageLockTableId;
extern LockTableId	MultiLevelLockTableId;
@


1.11
log
@jukebox storage manager installation
@
text
@d6 1
a6 1
 *	$Header: /users/mao/postgres/src/lib/H/storage/RCS/ipci.h,v 1.10 1991/07/22 14:25:52 mer Exp mao $
d67 1
a77 13

#else /* SONY_JUKEBOX */
/* --------------------------
 * NOTE: This macro must always give the highest numbered key as every backend
 * process forked off by the postmaster will be trying to acquire a semaphore
 * with a unique key value starting at key+13 and incrementing up.  Each
 * backend uses the current key value then increments it by one.
 * --------------------------
 */
#define IPCGetProcessSemaphoreInitKey(key) \
	((key == PrivateIPCKey) ? key : 13 + (key))

#endif /* SONY_JUKEBOX */
@


1.10
log
@new macro for lock manager process management
@
text
@d6 1
a6 1
 *	$Header: lib/H/storage/RCS/ipci.h,v 1.9 91/06/10 20:57:07 kemnitz Exp Locker: mer $
d64 15
d88 2
@


1.9
log
@generalization of spinlocks.
@
text
@d6 1
a6 1
 *	$Header: RCS/ipci.h,v 1.8 91/01/18 21:37:00 hong Exp $
d63 10
@


1.8
log
@two new macros
for new buffer manager
@
text
@d6 1
a6 1
 *	$Header: RCS/ipci.h,v 1.7 90/10/16 23:31:38 hong Exp Locker: hong $
d55 1
a55 1
#ifdef sequent
d58 1
a58 1
#endif
@


1.7
log
@replace semaphores with hardware locks for sequent
@
text
@d6 1
a6 1
 *	$Header: RCS/ipci.h,v 1.6 90/08/17 08:53:21 cimarron Exp Locker: hong $
d59 4
@


1.6
log
@added pathnames to #include statements
@
text
@d6 1
a6 1
 *	$Header: RCS/ipci.h,v 1.5 90/03/01 15:40:08 cimarron Version_2 Locker: cimarron $
d55 4
@


1.5
log
@general changes to add parallelism support, in-memory
relations, and various code cleanups.
@
text
@d6 1
a6 1
 *	$Header: RCS/ipci.h,v 1.4 89/09/05 17:06:58 mao C_Demo_1 $
d18 1
a18 3
#ifndef C_H
#include "c.h"
#endif
d20 2
a21 2
#include "ipc.h"
#include "pladt.h"
@


1.4
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/ipci.h,v 1.3 89/04/12 19:54:29 dillon Exp $
d36 1
d41 1
d52 5
@


1.3
log
@c.h
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/ipci.h,v 1.2 89/03/22 18:58:20 hirohama Stab $
@


1.2
log
@-r1.1 without the beta release copyright
@
text
@d6 1
a6 1
 *	$Header: ipci.h,v 1.1 89/01/17 05:54:13 hirohama Locked $
d18 1
d20 1
@


1.1
log
@Initial revision
@
text
@a0 27

; /*
; * 
; * POSTGRES Data Base Management System
; * 
; * Copyright (c) 1988 Regents of the University of California
; * 
; * Permission to use, copy, modify, and distribute this software and its
; * documentation for educational, research, and non-profit purposes and
; * without fee is hereby granted, provided that the above copyright
; * notice appear in all copies and that both that copyright notice and
; * this permission notice appear in supporting documentation, and that
; * the name of the University of California not be used in advertising
; * or publicity pertaining to distribution of the software without
; * specific, written prior permission.  Permission to incorporate this
; * software into commercial products can be obtained from the Campus
; * Software Office, 295 Evans Hall, University of California, Berkeley,
; * Ca., 94720 provided only that the the requestor give the University
; * of California a free licence to any derived software for educational
; * and research purposes.  The University of California makes no
; * representations about the suitability of this software for any
; * purpose.  It is provided "as is" without express or implied warranty.
; * 
; */



d6 1
a6 1
 *	$Header: ipci.h,v 1.1 88/11/11 16:37:08 postgres Exp $
@
