Changeset da1bafb in mainline for kernel/genarch/include/mm/page_ht.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/genarch/include/mm/page_ht.h

    r666f492 rda1bafb  
    3232/**
    3333 * @file
    34  * @brief       This is the generic page hash table interface.
     34 * @brief This is the generic page hash table interface.
    3535 */
    3636
     
    4646#include <adt/hash_table.h>
    4747
    48 #define PAGE_HT_KEYS    2
    49 #define KEY_AS          0
    50 #define KEY_PAGE        1
     48#define PAGE_HT_KEYS  2
     49#define KEY_AS        0
     50#define KEY_PAGE      1
    5151
    52 #define PAGE_HT_ENTRIES_BITS    13
    53 #define PAGE_HT_ENTRIES         (1 << PAGE_HT_ENTRIES_BITS)
     52#define PAGE_HT_ENTRIES_BITS  13
     53#define PAGE_HT_ENTRIES       (1 << PAGE_HT_ENTRIES_BITS)
    5454
    5555/* Macros for querying page hash table PTEs. */
    56 #define PTE_VALID(pte)          ((pte) != NULL)
    57 #define PTE_PRESENT(pte)        ((pte)->p != 0)
    58 #define PTE_GET_FRAME(pte)      ((pte)->frame)
    59 #define PTE_READABLE(pte)       1
    60 #define PTE_WRITABLE(pte)       ((pte)->w != 0)
    61 #define PTE_EXECUTABLE(pte)     ((pte)->x != 0)
     56#define PTE_VALID(pte)       ((pte) != NULL)
     57#define PTE_PRESENT(pte)     ((pte)->p != 0)
     58#define PTE_GET_FRAME(pte)   ((pte)->frame)
     59#define PTE_READABLE(pte)    1
     60#define PTE_WRITABLE(pte)    ((pte)->w != 0)
     61#define PTE_EXECUTABLE(pte)  ((pte)->x != 0)
    6262
    6363extern as_operations_t as_ht_operations;
Note: See TracChangeset for help on using the changeset viewer.