Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Mapping Class Reference

Represents one mapping in a mapping tree. More...

#include <mapdb.h>

List of all members.

Public Member Functions

unsigned space ()
 Address space.
Address vaddr ()
 Virtual address.
size_t size ()
 Size of page frame.
Mapping_type type ()
 Mapping type.
Mappingparent ()
 Parent.
Mappingnext_iter ()
 Next mapping in the mapping tree.
Mappingnext_child (Mapping *parent)
 Next child mapping of a given parent mapping.
bool space_is_sigma0 ()

Private Member Functions

 Mapping (const Mapping &)
Mapping_entry _data __attribute__ ((packed))
 Mapping ()
Mapping_entrydata ()
bool unused ()
 free entry?.
bool is_end_tag ()
Mappingnext (const Mapping *end_of_tree)
Mapping_treetree ()
 Our Mapping_tree.

Friends

class Mapdb
class Mapping_tree
class Jdb_mapdb
struct Physframe


Detailed Description

Represents one mapping in a mapping tree.

Instances of Mapping ("mappings") work as an iterator over a mapping tree. Mapping trees are never visible on the user level. Mappings are looked up directly in the mapping database (class Mapdb) using Mapdb::lookup(). When carrying out such a lookup, the mapping database locks the corresponding mapping tree before returning the mapping. This mapping can the be used to iterate over the tree and to look up other mappings in the tree. The mapping tree is unlocked (and all mappings pointing into it become invalid) when Mapdb::free is called with any one of its mappings.


Constructor & Destructor Documentation

Mapping::Mapping const Mapping  )  [private]
 

Mapping::Mapping  )  [inline, private]
 


Member Function Documentation

Mapping_entry _data Mapping::__attribute__ (packed  )  [private]
 

Mapping_entry * Mapping::data  )  [inline, private]
 

bool Mapping::is_end_tag  )  [inline, private]
 

Mapping * Mapping::next const Mapping end_of_tree  )  [inline, private]
 

Mapping * Mapping::next_child Mapping parent  ) 
 

Next child mapping of a given parent mapping.

This function traverses the mapping tree like next_iter(); however, it stops (and returns 0) if the next mapping is ouside the subtree starting with parent.

Parameters:
parent Parent mapping
Returns:
the next child mapping of a given parent mapping

Mapping * Mapping::next_iter  ) 
 

Next mapping in the mapping tree.

Returns:
the next mapping in the mapping tree. If the mapping has children, it is the first child. Otherwise, if the mapping has a sibling, it's the next sibling. Otherwise, if the mapping is the last sibling or only child, it's the mapping's parent.

Mapping * Mapping::parent  ) 
 

Parent.

Returns:
parent mapping of this mapping.

size_t Mapping::size  )  [inline]
 

Size of page frame.

Returns:
the size of the page frame -- 4K or 4M.

unsigned Mapping::space  )  [inline]
 

Address space.

Returns:
the address space into which the frame is mapped.

bool Mapping::space_is_sigma0  )  [inline]
 

Mapping_tree * Mapping::tree  )  [private]
 

Our Mapping_tree.

Returns:
the Mapping_tree we are in.

Mapping_type Mapping::type  )  [inline]
 

Mapping type.

Returns:
the type of the mapping -- memory or (Map_mem) I/O flexpage (Map_io).

bool Mapping::unused  )  [inline, private]
 

free entry?.

Returns:
true if this is unused.

Address Mapping::vaddr  )  [inline]
 

Virtual address.

Returns:
the virtual address at which the frame is mapped.


Friends And Related Function Documentation

friend class Jdb_mapdb [friend]
 

friend class Mapdb [friend]
 

friend class Mapping_tree [friend]
 

friend struct Physframe [friend]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:16 2005 for Fiasco by  doxygen 1.4.2