retire PUBLIC, PRIVATE and FORWARD

This commit is contained in:
Ben Gras
2012-03-25 20:25:53 +02:00
parent 6a73e85ad1
commit 7336a67dfe
603 changed files with 5776 additions and 5779 deletions

View File

@@ -47,7 +47,7 @@
addr_avl addravl;
/* Used for sanity check. */
PRIVATE phys_bytes mem_low, mem_high;
static phys_bytes mem_low, mem_high;
struct hole {
struct hole *h_next; /* pointer to next entry on the list */
@@ -60,24 +60,24 @@ struct hole {
#define _NR_HOLES (_NR_PROCS*2) /* No. of memory holes maintained by VM */
PRIVATE struct hole hole[_NR_HOLES];
static struct hole hole[_NR_HOLES];
PRIVATE struct hole *hole_head; /* pointer to first hole */
PRIVATE struct hole *free_slots;/* ptr to list of unused table slots */
static struct hole *hole_head; /* pointer to first hole */
static struct hole *free_slots;/* ptr to list of unused table slots */
FORWARD void del_slot(struct hole *prev_ptr, struct hole *hp);
FORWARD void merge(struct hole *hp);
FORWARD void free_pages(phys_bytes addr, int pages);
FORWARD phys_bytes alloc_pages(int pages, int flags, phys_bytes *ret);
static void del_slot(struct hole *prev_ptr, struct hole *hp);
static void merge(struct hole *hp);
static void free_pages(phys_bytes addr, int pages);
static phys_bytes alloc_pages(int pages, int flags, phys_bytes *ret);
#if SANITYCHECKS
FORWARD void holes_sanity_f(char *fn, int line);
static void holes_sanity_f(char *fn, int line);
#define CHECKHOLES holes_sanity_f(__FILE__, __LINE__)
#define PAGESPERGB (1024*1024*1024/VM_PAGE_SIZE) /* 1GB of memory */
#define MAXPAGES (2*PAGESPERGB)
#define CHUNKS BITMAP_CHUNKS(MAXPAGES)
PRIVATE bitchunk_t pagemap[CHUNKS];
static bitchunk_t pagemap[CHUNKS];
#else
#define CHECKHOLES
@@ -88,7 +88,7 @@ PRIVATE bitchunk_t pagemap[CHUNKS];
/*===========================================================================*
* holes_sanity_f *
*===========================================================================*/
PRIVATE void holes_sanity_f(file, line)
static void holes_sanity_f(file, line)
char *file;
int line;
{
@@ -158,7 +158,7 @@ int line;
/*===========================================================================*
* alloc_mem *
*===========================================================================*/
PUBLIC phys_clicks alloc_mem(phys_clicks clicks, u32_t memflags)
phys_clicks alloc_mem(phys_clicks clicks, u32_t memflags)
{
/* Allocate a block of memory from the free list using first fit. The block
* consists of a sequence of contiguous bytes, whose length in clicks is
@@ -202,7 +202,7 @@ CHECKHOLES;
/*===========================================================================*
* free_mem *
*===========================================================================*/
PUBLIC void free_mem(phys_clicks base, phys_clicks clicks)
void free_mem(phys_clicks base, phys_clicks clicks)
{
/* Return a block of free memory to the hole list. The parameters tell where
* the block starts in physical memory and how big it is. The block is added
@@ -255,7 +255,7 @@ CHECKHOLES;
/*===========================================================================*
* del_slot *
*===========================================================================*/
PRIVATE void del_slot(prev_ptr, hp)
static void del_slot(prev_ptr, hp)
/* pointer to hole entry just ahead of 'hp' */
register struct hole *prev_ptr;
/* pointer to hole entry to be removed */
@@ -279,7 +279,7 @@ register struct hole *hp;
/*===========================================================================*
* merge *
*===========================================================================*/
PRIVATE void merge(hp)
static void merge(hp)
register struct hole *hp; /* ptr to hole to merge with its successors */
{
/* Check for contiguous holes and merge any found. Contiguous holes can occur
@@ -313,7 +313,7 @@ register struct hole *hp; /* ptr to hole to merge with its successors */
/*===========================================================================*
* mem_init *
*===========================================================================*/
PUBLIC void mem_init(chunks)
void mem_init(chunks)
struct memory *chunks; /* list of free memory chunks */
{
/* Initialize hole lists. There are two lists: 'hole_head' points to a linked
@@ -358,7 +358,7 @@ struct memory *chunks; /* list of free memory chunks */
}
#if SANITYCHECKS
PRIVATE void sanitycheck(void)
static void sanitycheck(void)
{
pagerange_t *p, *prevp = NULL;
addr_iter iter;
@@ -375,7 +375,7 @@ PRIVATE void sanitycheck(void)
}
#endif
PUBLIC void memstats(int *nodes, int *pages, int *largest)
void memstats(int *nodes, int *pages, int *largest)
{
pagerange_t *p;
addr_iter iter;
@@ -399,7 +399,7 @@ PUBLIC void memstats(int *nodes, int *pages, int *largest)
/*===========================================================================*
* alloc_pages *
*===========================================================================*/
PRIVATE PUBLIC phys_bytes alloc_pages(int pages, int memflags, phys_bytes *len)
static phys_bytes alloc_pages(int pages, int memflags, phys_bytes *len)
{
addr_iter iter;
pagerange_t *pr;
@@ -525,7 +525,7 @@ PRIVATE PUBLIC phys_bytes alloc_pages(int pages, int memflags, phys_bytes *len)
/*===========================================================================*
* free_pages *
*===========================================================================*/
PRIVATE void free_pages(phys_bytes pageno, int npages)
static void free_pages(phys_bytes pageno, int npages)
{
pagerange_t *pr, *p;
addr_iter iter;
@@ -602,7 +602,7 @@ PRIVATE void free_pages(phys_bytes pageno, int npages)
#define NR_DMA 16
PRIVATE struct dmatab
static struct dmatab
{
int dt_flags;
endpoint_t dt_proc;
@@ -619,7 +619,7 @@ PRIVATE struct dmatab
/*===========================================================================*
* do_adddma *
*===========================================================================*/
PUBLIC int do_adddma(message *msg)
int do_adddma(message *msg)
{
endpoint_t target_proc_e;
int i, proc_n;
@@ -671,7 +671,7 @@ PUBLIC int do_adddma(message *msg)
/*===========================================================================*
* do_deldma *
*===========================================================================*/
PUBLIC int do_deldma(message *msg)
int do_deldma(message *msg)
{
endpoint_t target_proc_e;
int i, j;
@@ -729,7 +729,7 @@ PUBLIC int do_deldma(message *msg)
/*===========================================================================*
* do_getdma *
*===========================================================================*/
PUBLIC int do_getdma(message *msg)
int do_getdma(message *msg)
{
int i;
@@ -760,7 +760,7 @@ PUBLIC int do_getdma(message *msg)
/*===========================================================================*
* release_dma *
*===========================================================================*/
PUBLIC void release_dma(struct vmproc *vmp)
void release_dma(struct vmproc *vmp)
{
#if 0
int i, found_one;