File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
contrib/pg_dtm/dtmd/include Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ #ifndef DDD_H
2+
3+ #include <stdbool.h>
4+ #include "transaction.h"
5+
6+ typedef struct Instance {
7+ struct Edge * edges ; /* local subgraph */
8+ } Instance ;
9+
10+ typedef struct Edge {
11+ L2List node ; /* node of list of outgoing eedges */
12+ struct Edge * next ; /* list of edges of local subgraph */
13+ struct Vertex * dst ;
14+ struct Vertex * src ;
15+ } Edge ;
16+
17+ typedef struct Vertex
18+ {
19+ L2List outgoingEdges ;
20+ struct Vertex * next ;
21+ xid_t xid ;
22+ int nIncomingEdges ;
23+ int visited ;
24+ } Vertex ;
25+
26+ typedef struct Graph
27+ {
28+ Vertex * hashtable [MAX_TRANSACTIONS ];
29+ Edge * freeEdges ;
30+ Vertex * freeVertexes ;
31+ int marker ;
32+ } Graph ;
33+
34+
35+ extern void initGraph (Graph * graph );
36+ extern void addSubgraph (Instance * instance , Graph * graph , xid_t * xids , int n_xids );
37+ extern bool findLoop (Graph * graph , xid_t root );
38+
39+ #endif
You can’t perform that action at this time.
0 commit comments