Files
mckernel/lib/include/ihk/page_alloc.h
Masamichi Takagi 2f89e26ac0 add modification history entry to the following files,
mckernel/lib/include/*.h
  mckernel/arch/x86/elfboot/*
  mckernel/arch/x86/kboot/main.c
  mckernel/arch/x86/kernel/*
  mckernel/lib/page_alloc.c
  mckernel/lib/string.c
  mckernel/lib/include/ihk/*
except
  mckernel/arch/x86/kernel/include/signal.h
  mckernel/arch/x86/tools/mcreboot-attached-mic.sh.in
  mckernel/arch/x86/kernel/include/syscall_list.h
  mckernel/arch/x86/kernel/syscall.c
.
2013-11-14 18:30:06 +09:00

43 lines
1.3 KiB
C

/**
* \file page_alloc.h
* License details are found in the file LICENSE.
* \brief
* Declare functions acquire physical pages and assign virtual addresses
* to them.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
/*
* HISTORY
*/
#ifndef __HEADER_GENERIC_IHK_PAGE_ALLOC
#define __HEADER_GENERIC_IHK_PAGE_ALLOC
struct ihk_page_allocator_desc {
unsigned long start;
unsigned int last;
unsigned int count;
unsigned int flag;
unsigned int shift;
ihk_spinlock_t lock;
unsigned int pad;
unsigned long map[0];
};
unsigned long ihk_pagealloc_count(void *__desc);
void *__ihk_pagealloc_init(unsigned long start, unsigned long size,
unsigned long unit, void *initial,
unsigned long *pdescsize);
void *ihk_pagealloc_init(unsigned long start, unsigned long size,
unsigned long unit);
void ihk_pagealloc_destroy(void *__desc);
unsigned long ihk_pagealloc_alloc(void *__desc, int npages, int p2align);
void ihk_pagealloc_reserve(void *desc, unsigned long start, unsigned long end);
void ihk_pagealloc_free(void *__desc, unsigned long address, int npages);
unsigned long ihk_pagealloc_count(void *__desc);
int ihk_pagealloc_query_free(void *__desc);
#endif