31 #ifndef __ARCH_SPARC_TLB_MAP_HH__
32 #define __ARCH_SPARC_TLB_MAP_HH__
44 typedef std::map<TlbRange, TlbEntry*>
RangeMap;
55 i =
tree.upper_bound(r);
57 if (i ==
tree.begin()) {
58 if (r.
real == i->first.real &&
60 i->first.va < r.
va + r.
size &&
61 i->first.va+i->first.size >= r.
va &&
71 if (r.
real != i->first.real)
77 if (i->first.va <= r.
va+r.
size &&
78 i->first.va+i->first.size >= r.
va)
101 return tree.insert(std::make_pair(r, d)).first;
107 return tree.erase(k);
157 while (i !=
tree.end()) {
158 std::cout << std::hex << i->first.va <<
" " << i->first.size <<
" " <<
159 i->first.contextId <<
" " << i->first.partitionId <<
" " <<
160 i->first.real <<
" " << i->second << std::endl;
169 #endif // __ARCH_SPARC_TLB_MAP_HH__
iterator insert(TlbRange &r, TlbEntry *d)
std::map< TlbRange, TlbEntry * > RangeMap
RangeMap::iterator iterator
void erase(iterator p, iterator q)
bool intersect(const TlbRange &r)
iterator find(const TlbRange &r)