11/*-------------------------------------------------------------------------
22 *
33 * xact.h
4- * postgres transaction systemheader
4+ * postgres transaction systemdefinitions
55 *
66 *
77 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $Id: xact.h,v 1.26 2000/06/08 22:37:38 momjian Exp $
10+ * $Id: xact.h,v 1.27 2000/07/28 01:04:40 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
1717#include "access/transam.h"
1818#include "utils/nabstime.h"
1919
20+ /*
21+ * Xact isolation levels
22+ */
23+ #define XACT_DIRTY_READ 0/* not implemented */
24+ #define XACT_READ_COMMITTED 1
25+ #define XACT_REPEATABLE_READ 2/* not implemented */
26+ #define XACT_SERIALIZABLE 3
27+
28+ extern int DefaultXactIsoLevel ;
29+ extern int XactIsoLevel ;
30+
2031/* ----------------
2132 *transaction state structure
2233 * ----------------
@@ -31,16 +42,7 @@ typedef struct TransactionStateData
3142int blockState ;
3243}TransactionStateData ;
3344
34- /*
35- * Xact isolation levels
36- */
37- #define XACT_DIRTY_READ 0/* not implemented */
38- #define XACT_READ_COMMITTED 1
39- #define XACT_REPEATABLE_READ 2/* not implemented */
40- #define XACT_SERIALIZABLE 3
41-
42- extern int DefaultXactIsoLevel ;
43- extern int XactIsoLevel ;
45+ typedef TransactionStateData * TransactionState ;
4446
4547/* ----------------
4648 *transaction states
@@ -64,23 +66,16 @@ extern intXactIsoLevel;
6466#define TBLOCK_ABORT 4
6567#define TBLOCK_ENDABORT 5
6668
67- typedef TransactionStateData * TransactionState ;
68-
69- #define TransactionIdIsValid (xid )((bool) (xid != NullTransactionId))
69+ /* ----------------
70+ *transaction ID manipulation macros
71+ * ----------------
72+ */
73+ #define TransactionIdIsValid (xid )((bool) ((xid) != NullTransactionId))
74+ #define TransactionIdEquals (id1 ,id2 )((bool) ((id1) == (id2)))
7075#define TransactionIdStore (xid ,dest )\
71- (*((TransactionId*)dest) = (TransactionId)xid)
76+ (*((TransactionId*) ( dest)) = (TransactionId) ( xid) )
7277#define StoreInvalidTransactionId (dest ) \
73- (*((TransactionId*)dest) = NullTransactionId)
74-
75-
76- /* ----------------------------------------------------------------
77- *TransactionIdEquals
78- * ----------------------------------------------------------------
79- */
80- #define TransactionIdEquals (id1 ,id2 ) \
81- ( \
82- ((bool) ((id1) == (id2))) \
83- )
78+ (*((TransactionId*) (dest)) = NullTransactionId)
8479
8580
8681/* ----------------