Commit e3191533 authored by Jack Lange's avatar Jack Lange

add missing file

parent d4684e77
/*
* Copyright (c) 2016, Jack Lange <jacklange@cs.pitt.edu>
* All rights reserved.
*
* This is free software. You are permitted to use,
* redistribute, and modify it as specified in the file "PETLAB_LICENSE".
*/
#include "vos.h"
uintptr_t
vos_alloc_pages(gfp_t gfp_mask,
u32 order)
{
struct page * pgs = alloc_pages(gfp_mask, order);
if (!pgs) {
ERROR("Could not allocate pages\n");
return 0;
}
return page_to_pfn(pgs) << PAGE_SHIFT;
}
void
vos_free_pages(uintptr_t addr,
u32 order)
{
free_pages((uintptr_t)__va(addr), order);
}
void *
vos_kmalloc(size_t size,
gfp_t flags)
{
return kmalloc(size, flags);
}
void
vos_kfree(void * ptr)
{
kfree(ptr);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment