Atlas Runtime
recover.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright 2016 Hewlett Packard Enterprise Development LP
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, either version 3 of the
7  * License, or (at your option) any later version. This program is
8  * distributed in the hope that it will be useful, but WITHOUT ANY
9  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11  * for more details. You should have received a copy of the GNU Lesser
12  * General Public License along with this program. If not, see
13  * <http://www.gnu.org/licenses/>.
14  */
15 
16 
17 #ifndef _RECOVER_H
18 #define _RECOVER_H
19 
20 #include <map>
21 
22 using namespace std;
23 using namespace Atlas;
24 
25 //namespace Atlas {
26 
27 // There is a one-to-one mapping between a release and an acquire log
28 // entry, unless the associated lock is a rwlock
29 typedef multimap<LogEntry*, pair<LogEntry*,int /* thread id */> > MapR2A;
30 typedef MapR2A::const_iterator R2AIter;
31 typedef map<int /* tid */, LogEntry* /* last log replayed */> Tid2Log;
32 typedef map<LogEntry*, bool> MapLog2Bool;
33 typedef map<uint32_t, bool> MapInt2Bool;
34 typedef map<LogEntry*, LogEntry*> MapLog2Log;
35 
36 void R_Initialize(const char *name);
37 void R_Finalize(const char *name);
40 void AddToMap(LogEntry*,int);
41 void Recover();
42 void Recover(int);
43 void MarkReplayed(LogEntry*);
45 
46 //} // namespace Atlas
47 
48 #endif
LogStructure * GetLogStructureHeader()
Definition: recover.cpp:148
Definition: log_structure.hpp:30
map< LogEntry *, bool > MapLog2Bool
Definition: recover.hpp:32
MapR2A::const_iterator R2AIter
Definition: recover.hpp:30
map< int, LogEntry * > Tid2Log
Definition: recover.hpp:31
void Recover()
Definition: recover.cpp:283
void R_Finalize(const char *name)
Definition: recover.cpp:135
multimap< LogEntry *, pair< LogEntry *, int > > MapR2A
Definition: recover.hpp:29
map< uint32_t, bool > MapInt2Bool
Definition: recover.hpp:33
Definition: log_structure.hpp:77
bool isAlreadyReplayed(LogEntry *)
Definition: recover.cpp:364
void AddToMap(LogEntry *, int)
Definition: recover.cpp:199
void MarkReplayed(LogEntry *)
Definition: recover.cpp:357
void CreateRelToAcqMappings(LogStructure *)
Definition: recover.cpp:163
void R_Initialize(const char *name)
Definition: recover.cpp:93
Definition: atlas_alloc_cpp.hpp:21
map< LogEntry *, LogEntry * > MapLog2Log
Definition: recover.hpp:34