head     1.9;
branch   ;
access   ;
symbols  Version_2_1:1.9 Version_2:1.9 C_Demo_1:1.7;
locks    ; strict;
comment  @ * @;


1.9
date     89.09.21.19.13.20;  author hirohama;  state Version_2;
branches ;
next     1.8;

1.8
date     89.09.08.23.33.25;  author dillon;  state Exp;
branches ;
next     1.7;

1.7
date     89.09.05.17.12.30;  author mao;  state C_Demo_1;
branches ;
next     1.6;

1.6
date     89.09.03.11.55.19;  author dillon;  state Exp;
branches ;
next     1.5;

1.5
date     89.08.04.14.49.00;  author dillon;  state Exp;
branches ;
next     1.4;

1.4
date     89.08.03.03.10.19;  author dillon;  state Exp;
branches ;
next     1.3;

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

1.2
date     89.04.14.18.20.53;  author dillon;  state Exp;
branches ;
next     1.1;

1.1
date     89.03.02.22.45.47;  author dillon;  state Stab;
branches ;
next     ;


desc
@Structures associated with taslock.c module (test-and-set locks...
eventually will replace high level semaphore usage)
@


1.9
log
@added ...SYMBOLS declarations
miscellaneous cleanup
@
text
@/*
 * taslock.h --
 *
 * Note:
 *	Included by pladt.h.
 */

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

/*
 * Identification:
 */
#define TASLOCK_H	"$Header: RCS/taslock.h,v 1.8 89/09/08 23:33:25 dillon Exp Locker: hirohama $"

#include "port_taslock.h"	/* from port* directory */

#define NUMPROCS	64

typedef unsigned char ubyte;

typedef struct {
    slock_t MasterLock;	/* lock is in use for read or write 	*/
    slock_t MinorLock;	/* spin-lock (monitor access)		*/
    int  NHeld;		/* number of (read) locks held		*/
    int  NWait;		/* number of processes waiting for lock */
} TasLock;

typedef struct {
    TasLock	Tas[NUMTASLOCKS];	/* normal Tas locks		  */
    TasLock	TasInit;	/* spin lock for array allocation */
    int		NumProcs;	/* this + Array_* gov't by TasInit*/
    int		Array_Pid[NUMPROCS];
    int		Array_Lck[NUMPROCS];
    char	Monitor[NUMPROCS];
} TASStructure;

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


1.8
log
@had to add Monitor again ??
@
text
@a0 1

d2 1
a2 1
 *  TASLOCK.H
d4 2
a5 3
 *  $Header: RCS/taslock.h,v 1.7 89/09/05 17:12:30 mao C_Demo_1 Locker: dillon $
 *
 *  included by pladt.h
d8 2
a9 5
#ifndef INCLUDE_TASKLOCK_H
#define INCLUDE_TASKLOCK_H
#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
d11 4
a14 1
#define NUMPROCS	64
d18 2
d38 1
a38 2
#endif

@


1.7
log
@Working version of C-only demo
@
text
@d5 1
a5 1
 *  $Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/taslock.h,v 1.5 89/08/04 14:49:00 dillon Exp $
d35 1
@


1.6
log
@added new element to shared memory structure
@
text
@d5 1
a5 1
 *  $Header: RCS/taslock.h,v 1.5 89/08/04 14:49:00 dillon Exp Locker: dillon $
a34 1
    char	Monitor[NUMPROCS];	/* risc processors w/no tas()	*/
@


1.5
log
@*** empty log message ***
@
text
@d5 1
a5 1
 *  $Header: taslock.h 1.13 89/08/03 02:00:00 dillon Exp $
d35 1
@


1.4
log
@gets info from include file in appropriate port directory
@
text
@d5 2
@


1.3
log
@shared memory lock manager code that no longer uses semaphores
@
text
@d16 1
a16 7
#ifndef sequent
CauseCompilerError();
#endif

#ifdef sequent
#include <parallel/parallel.h>
#endif
@


1.2
log
@*** empty log message ***
@
text
@d2 6
a14 1
#define NUMTASLOCKS	(NMAXSEM+NEXTRASEM)
d16 8
d27 2
a28 2
    ubyte MasterLock;	/* lock is in use for read or write 	*/
    ubyte MinorLock;	/* spin-lock (monitor access)		*/
@


1.1
log
@Initial revision
@
text
@a4 3
/*#include <sys/ipc.h>
 #include <sys/shm.h>
 */
@
