Changeset da1bafb in mainline for kernel/generic/include/mm/page.h


Ignore:
Timestamp:
2010-05-24T18:57:31Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0095368
Parents:
666f492
Message:

major code revision

  • replace spinlocks taken with interrupts disabled with irq_spinlocks
  • change spacing (not indendation) to be tab-size independent
  • use unsigned integer types where appropriate (especially bit flags)
  • visual separation
  • remove argument names in function prototypes
  • string changes
  • correct some formating directives
  • replace various cryptic single-character variables (t, a, m, c, b, etc.) with proper identifiers (thread, task, timeout, as, itm, itc, etc.)
  • unify some assembler constructs
  • unused page table levels are now optimized out in compile time
  • replace several ints (with boolean semantics) with bools
  • use specifically sized types instead of generic types where appropriate (size_t, uint32_t, btree_key_t)
  • improve comments
  • split asserts with conjuction into multiple independent asserts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/page.h

    r666f492 rda1bafb  
    4242/** Operations to manipulate page mappings. */
    4343typedef struct {
    44         void (* mapping_insert)(as_t *as, uintptr_t page, uintptr_t frame,
    45             int flags);
    46         void (* mapping_remove)(as_t *as, uintptr_t page);
    47         pte_t *(* mapping_find)(as_t *as, uintptr_t page);
     44        void (* mapping_insert)(as_t *, uintptr_t, uintptr_t, unsigned int);
     45        void (* mapping_remove)(as_t *, uintptr_t);
     46        pte_t *(* mapping_find)(as_t *, uintptr_t);
    4847} page_mapping_operations_t;
    4948
     
    5150
    5251extern void page_init(void);
    53 extern void page_table_lock(as_t *as, bool lock);
    54 extern void page_table_unlock(as_t *as, bool unlock);
    55 extern void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
    56     int flags);
    57 extern void page_mapping_remove(as_t *as, uintptr_t page);
    58 extern pte_t *page_mapping_find(as_t *as, uintptr_t page);
    59 extern pte_t *page_table_create(int flags);
    60 extern void page_table_destroy(pte_t *page_table);
    61 extern void map_structure(uintptr_t s, size_t size);
     52extern void page_table_lock(as_t *, bool);
     53extern void page_table_unlock(as_t *, bool);
     54extern void page_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int);
     55extern void page_mapping_remove(as_t *, uintptr_t);
     56extern pte_t *page_mapping_find(as_t *, uintptr_t);
     57extern pte_t *page_table_create(unsigned int);
     58extern void page_table_destroy(pte_t *);
     59extern void map_structure(uintptr_t, size_t);
    6260
    63 extern uintptr_t hw_map(uintptr_t physaddr, size_t size);
     61extern uintptr_t hw_map(uintptr_t, size_t);
    6462
    6563#endif
Note: See TracChangeset for help on using the changeset viewer.