33,7 → 33,6 |
#include <arch/types.h> |
#include <typedefs.h> |
#include <memstr.h> |
#include <adt/hash_table.h> |
|
static pte_t *ht_create(int flags); |
|
49,12 → 48,13 |
* |
* @param flags Ignored. |
* |
* @return Returns NULL. |
* @return Address of global page hash table. |
*/ |
pte_t *ht_create(int flags) |
{ |
if (flags & FLAG_AS_KERNEL) { |
hash_table_create(&page_ht, PAGE_HT_ENTRIES, 2, &ht_operations); |
if (!page_ht) { |
page_ht = (pte_t *) frame_alloc(HT_WIDTH - FRAME_WIDTH, FRAME_KA | FRAME_PANIC); |
memsetb((__address) page_ht, HT_SIZE, 0); |
} |
return NULL; |
return page_ht; |
} |