Making more functions static

This commit is contained in:
Ali Mashtizadeh 2015-02-16 13:32:14 -08:00
parent 0d335ebe20
commit a053a30129
10 changed files with 27 additions and 22 deletions

View File

@ -41,7 +41,7 @@ Critical_Exit()
}
}
void
static void
Debug_Critical(int argc, const char *argv[])
{
int c;

View File

@ -25,7 +25,7 @@ Debug_Breakpoint(TrapFrame *tf)
// Resume all processors
}
void
static void
Debug_Registers(int argc, const char *argv[])
{
TrapFrame *tf = frames[CPU()];
@ -58,7 +58,7 @@ Debug_Registers(int argc, const char *argv[])
REGISTER_DBGCMD(registers, "Show CPU registers", Debug_Registers);
void
static void
Debug_Backtrace(int argc, const char *argv[])
{
TrapFrame *tf = frames[CPU()];
@ -80,7 +80,7 @@ Debug_Backtrace(int argc, const char *argv[])
REGISTER_DBGCMD(backtrace, "Print backtrace", Debug_Backtrace);
void
static void
Debug_Reboot(int argc, const char *argv[])
{
/*

View File

@ -80,7 +80,7 @@ IOAPIC_Disable(int irq)
IOAPIC_Write(IOREDTBL0 + 2*irq, val | IOREDTBL_MASK);
}
void
static void
Debug_IOAPIC(int argc, const char *argv[])
{
int i;

View File

@ -218,7 +218,7 @@ LAPIC_Init()
LAPIC_Write(LAPIC_TPR, 0);
}
void
static void
Debug_LAPIC(int argc, const char *argv[])
{
uint32_t version = LAPIC_Read(LAPIC_VERSION);

View File

@ -41,7 +41,8 @@ TaskStateSegment64 TSS[MAX_CPUS];
static char df_stack[4096];
void Machine_GDTInit()
static void
Machine_GDTInit()
{
uint64_t offset;
uint64_t tmp;
@ -75,7 +76,8 @@ void Machine_GDTInit()
kprintf("Done!\n");
}
void Machine_TSSInit()
static void
Machine_TSSInit()
{
int c = CPU();
@ -102,7 +104,8 @@ void Machine_TSSInit()
kprintf("Done!\n");
}
void Machine_SyscallInit()
static void
Machine_SyscallInit()
{
kprintf("Initializing Syscall... ");
@ -114,7 +117,8 @@ void Machine_SyscallInit()
kprintf("Done!\n");
}
void Machine_EarlyInit()
void
Machine_EarlyInit()
{
Spinlock_EarlyInit();
Critical_Init();
@ -123,7 +127,8 @@ void Machine_EarlyInit()
PAlloc_Init();
}
void Machine_IdleThread(void *test)
static void
Machine_IdleThread(void *test)
{
while (1) { enable_interrupts(); hlt(); }
}
@ -133,7 +138,7 @@ void Machine_Init()
Machine_GDTInit();
Machine_TSSInit();
Trap_Init();
//Machine_SyscallInit();
Machine_SyscallInit();
PAlloc_AddRegion(DMPA2VA(16*1024*1024), 16*1024*1024);
PMap_Init();
@ -186,7 +191,7 @@ void Machine_InitAP()
PMap_InitAP();
Machine_GDTInit();
Machine_TSSInit();
//Machine_SyscallInit();
Machine_SyscallInit();
// Setup LAPIC
LAPIC_Init();

View File

@ -62,14 +62,14 @@ MP_InitAP()
booted = 1;
}
void
static void
Debug_CPUS(int argc, const char *argv[])
{
}
REGISTER_DBGCMD(cpus, "Show MP information", Debug_CPUS);
void
static void
Debug_CPU(int argc, const char *argv[])
{
kprintf("CPU %d\n", CPU());

View File

@ -125,7 +125,7 @@ PMap_LoadAS(AS *space)
currentAS[THISCPU()] = space;
}
PageTable *
static PageTable *
PMapAllocPageTable()
{
int i;
@ -187,7 +187,7 @@ PMap_Translate(AS *space, uintptr_t va)
return (*entry & ~(PGMASK | PTE_NX)) + (va & PGMASK);
}
void
static void
PMapLookupEntry(AS *space, uint64_t va, PageEntry **entry, int size)
{
int i,j,k,l;
@ -369,7 +369,7 @@ PMap_SystemUnmap(uint64_t virt, uint64_t pages)
return false;
}
uint64_t
static uint64_t
AddrFromIJKL(uint64_t i, uint64_t j, uint64_t k, uint64_t l)
{
return (i << 39) | (j << HUGE_PGSHIFT) | (k << LARGE_PGSHIFT) | (l << PGSHIFT);
@ -434,7 +434,7 @@ PMap_Dump(AS *space)
return;
}
void
static void
Debug_PMapDump(int argc, const char *argv[])
{
PMap_Dump(currentAS[THISCPU()]);

View File

@ -15,7 +15,7 @@ Time_GetTSC()
return rdtsc();
}
void
static void
Debug_ReadTSC(int argc, const char *argv[])
{
kprintf("RDTSC: %lld\n", Time_GetTSC());

View File

@ -249,7 +249,7 @@ trap_entry(TrapFrame *tf)
hlt();
}
void
static void
Debug_Traps(int argc, const char *argv[])
{
int i;

View File

@ -114,7 +114,7 @@ XMem_Allocate(XMem *xmem, uintptr_t length)
return true;
}
void
static void
Debug_XMemStats(int argc, const char *argv[])
{
int r;