Subversion Repositories HelenOS-historic

Rev

Rev 977 | Rev 1423 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 977 Rev 1108
Line 28... Line 28...
28
 
28
 
29
/*
29
/*
30
 * This is the generic page hash table interface.
30
 * This is the generic page hash table interface.
31
 */
31
 */
32
 
32
 
-
 
33
#ifdef CONFIG_PAGE_HT
-
 
34
 
33
#ifndef __PAGE_HT_H__
35
#ifndef __PAGE_HT_H__
34
#define __PAGE_HT_H__
36
#define __PAGE_HT_H__
35
 
37
 
36
#include <mm/page.h>
38
#include <mm/page.h>
37
#include <typedefs.h>
39
#include <typedefs.h>
Line 44... Line 46...
44
#define KEY_PAGE    1
46
#define KEY_PAGE    1
45
 
47
 
46
#define PAGE_HT_ENTRIES_BITS    13
48
#define PAGE_HT_ENTRIES_BITS    13
47
#define PAGE_HT_ENTRIES     (1<<PAGE_HT_ENTRIES_BITS)
49
#define PAGE_HT_ENTRIES     (1<<PAGE_HT_ENTRIES_BITS)
48
 
50
 
49
#define PTE_VALID_ARCH(pte)     ((pte) != NULL)
51
#define PTE_VALID(pte)      ((pte) != NULL)
50
#define PTE_PRESENT_ARCH(pte)       ((pte)->p != 0)
52
#define PTE_PRESENT(pte)    ((pte)->p != 0)
51
#define PTE_GET_FRAME_ARCH(pte)     ((pte)->frame)
53
#define PTE_GET_FRAME(pte)  ((pte)->frame)
-
 
54
 
-
 
55
#define SET_PTL0_ADDRESS(x)
52
 
56
 
53
struct pte {
57
struct pte {
54
    link_t link;        /**< Page hash table link. */
58
    link_t link;        /**< Page hash table link. */
55
    as_t *as;       /**< Address space. */
59
    as_t *as;       /**< Address space. */
56
    __address page;     /**< Virtual memory page. */
60
    __address page;     /**< Virtual memory page. */
Line 69... Line 73...
69
extern spinlock_t page_ht_lock;
73
extern spinlock_t page_ht_lock;
70
extern hash_table_t page_ht;
74
extern hash_table_t page_ht;
71
extern hash_table_operations_t ht_operations;
75
extern hash_table_operations_t ht_operations;
72
 
76
 
73
#endif
77
#endif
-
 
78
 
-
 
79
#endif