Rev 1239 | Rev 1288 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1239 | Rev 1248 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| 29 | /* |
29 | /** |
| - | 30 | * @file as.c |
|
| - | 31 | * @brief Address space related functions. |
|
| - | 32 | * |
|
| 30 | * This file contains address space manipulation functions. |
33 | * This file contains address space manipulation functions. |
| 31 | * Roughly speaking, this is a higher-level client of |
34 | * Roughly speaking, this is a higher-level client of |
| 32 | * Virtual Address Translation (VAT) subsystem. |
35 | * Virtual Address Translation (VAT) subsystem. |
| - | 36 | * |
|
| - | 37 | * Functionality provided by this file allows one to |
|
| - | 38 | * create address space and create, resize and share |
|
| - | 39 | * address space areas. |
|
| - | 40 | * |
|
| - | 41 | * @see page.c |
|
| - | 42 | * |
|
| 33 | */ |
43 | */ |
| 34 | 44 | ||
| 35 | #include <mm/as.h> |
45 | #include <mm/as.h> |
| 36 | #include <arch/mm/as.h> |
46 | #include <arch/mm/as.h> |
| 37 | #include <mm/page.h> |
47 | #include <mm/page.h> |
| Line 682... | Line 692... | ||
| 682 | * Locking order is such that address space areas must be locked |
692 | * Locking order is such that address space areas must be locked |
| 683 | * prior to this call. Address space can be locked prior to this |
693 | * prior to this call. Address space can be locked prior to this |
| 684 | * call in which case the lock argument is false. |
694 | * call in which case the lock argument is false. |
| 685 | * |
695 | * |
| 686 | * @param as Address space. |
696 | * @param as Address space. |
| 687 | * @param as_locked If false, do not attempt to lock as->lock. |
697 | * @param lock If false, do not attempt to lock as->lock. |
| 688 | */ |
698 | */ |
| 689 | void page_table_lock(as_t *as, bool lock) |
699 | void page_table_lock(as_t *as, bool lock) |
| 690 | { |
700 | { |
| 691 | ASSERT(as_operations); |
701 | ASSERT(as_operations); |
| 692 | ASSERT(as_operations->page_table_lock); |
702 | ASSERT(as_operations->page_table_lock); |
| Line 695... | Line 705... | ||
| 695 | } |
705 | } |
| 696 | 706 | ||
| 697 | /** Unlock page table. |
707 | /** Unlock page table. |
| 698 | * |
708 | * |
| 699 | * @param as Address space. |
709 | * @param as Address space. |
| 700 | * @param as_locked If false, do not attempt to unlock as->lock. |
710 | * @param unlock If false, do not attempt to unlock as->lock. |
| 701 | */ |
711 | */ |
| 702 | void page_table_unlock(as_t *as, bool unlock) |
712 | void page_table_unlock(as_t *as, bool unlock) |
| 703 | { |
713 | { |
| 704 | ASSERT(as_operations); |
714 | ASSERT(as_operations); |
| 705 | ASSERT(as_operations->page_table_unlock); |
715 | ASSERT(as_operations->page_table_unlock); |