29 #ifndef __ARCH_SPARC_TLB_MAP_HH__ 30 #define __ARCH_SPARC_TLB_MAP_HH__ 42 typedef std::map<TlbRange, TlbEntry*>
RangeMap;
53 i = tree.upper_bound(r);
55 if (i == tree.begin()) {
56 if (r.
real == i->first.real &&
58 i->first.va < r.
va + r.
size &&
59 i->first.va+i->first.size >= r.
va &&
69 if (r.
real != i->first.real)
75 if (i->first.va <= r.
va+r.
size &&
76 i->first.va+i->first.size >= r.
va)
99 return tree.insert(std::make_pair(r, d)).first;
105 return tree.erase(k);
123 tree.erase(tree.begin(), tree.end());
155 while (i != tree.end()) {
156 std::cout << std::hex << i->first.va <<
" " << i->first.size <<
" " <<
157 i->first.contextId <<
" " << i->first.partitionId <<
" " <<
158 i->first.real <<
" " << i->second << std::endl;
167 #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)