From: Ben Gras Date: Mon, 8 Jun 2009 04:30:16 +0000 (+0000) Subject: minor cleanup X-Git-Tag: v3.1.4~8 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=9e72241374d1eaf738fafd52fdf96b3ba7b54ed5;p=minix.git minor cleanup --- diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index eebf14374..14f90d5fd 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -141,7 +141,6 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr, int procslot; NOREC_ENTER(linlincopy); - FIXME("lin_lin_copy requires big pages"); vmassert(vm_running); vmassert(!catch_pagefaults); vmassert(nfreepdes >= 3); diff --git a/kernel/arch/i386/proto.h b/kernel/arch/i386/proto.h index 04866debf..0dfb478c9 100644 --- a/kernel/arch/i386/proto.h +++ b/kernel/arch/i386/proto.h @@ -80,6 +80,7 @@ _PROTOTYPE( int _memcpy_k, (void *dst, void *src, size_t n) ); _PROTOTYPE( int _memcpy_k_fault, (void) ); _PROTOTYPE( u32_t read_cr3, (void) ); _PROTOTYPE( void reload_cr3, (void) ); +_PROTOTYPE( void phys_memset, (phys_bytes ph, u32_t c, phys_bytes bytes) ); /* protect.c */ _PROTOTYPE( void prot_init, (void) ); diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/system.c index 4fac6d0fb..4b88b085c 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/system.c @@ -137,6 +137,21 @@ PUBLIC void do_ser_debug() ser_debug(c); } +PRIVATE void ser_dump_queues(void) +{ + int q; + for(q = 0; q < NR_SCHED_QUEUES; q++) { + struct proc *p; + if(rdy_head[q]) + printf("%2d: ", q); + for(p = rdy_head[q]; p; p = p->p_nextready) { + printf("%s / %d ", p->p_name, p->p_endpoint); + } + printf("\n"); + } + +} + PRIVATE void ser_debug(int c) { int u = 0; @@ -228,20 +243,6 @@ PRIVATE void printslot(struct proc *pp, int level) printslot(depproc, level+1); } -PUBLIC void ser_dump_queues() -{ - int q; - for(q = 0; q < NR_SCHED_QUEUES; q++) { - struct proc *p; - if(rdy_head[q]) - printf("%2d: ", q); - for(p = rdy_head[q]; p; p = p->p_nextready) { - printf("%s / %d ", p->p_name, p->p_endpoint); - } - printf("\n"); - } - -} PUBLIC void ser_dump_proc() { diff --git a/kernel/debug.h b/kernel/debug.h index 8ad26332f..baa044834 100644 --- a/kernel/debug.h +++ b/kernel/debug.h @@ -48,8 +48,7 @@ if(varname) { \ minix_panic(#varname " recursive enter", __LINE__); \ } \ - varname = 1; \ - FIXME(#varname " recursion check enabled"); + varname = 1; #define NOREC_RETURN(varname, v) do { \ if(!varname) \ diff --git a/kernel/proc.c b/kernel/proc.c index c5318b5c0..789965d22 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -97,8 +97,6 @@ PRIVATE int QueueMess(endpoint_t ep, vir_bytes msg_lin, struct proc *dst) vmassert(!(dst->p_misc_flags & MF_DELIVERMSG)); vmassert(dst->p_delivermsg_lin); vmassert(isokendpt(ep, &k)); - FIXME("copy messages directly if in memory"); - FIXME("possibly also msgcopy specific function"); if(INMEMORY(dst)) { PHYS_COPY_CATCH(msg_lin, dst->p_delivermsg_lin, @@ -120,12 +118,6 @@ PRIVATE int QueueMess(endpoint_t ep, vir_bytes msg_lin, struct proc *dst) dst->p_delivermsg.m_source = ep; dst->p_misc_flags |= MF_DELIVERMSG; -#if 0 - if(INMEMORY(dst)) { - delivermsg(dst); - } -#endif - NOREC_RETURN(queuemess, OK); } @@ -621,7 +613,6 @@ int flags; #endif /* Found acceptable message. Copy it and update status. */ - FIXME("message copied twice here"); vmassert(!(caller_ptr->p_misc_flags & MF_DELIVERMSG)); QueueMess((*xpp)->p_endpoint, vir2phys(&(*xpp)->p_sendmsg), caller_ptr); @@ -743,6 +734,8 @@ size_t size; if(!(linaddr = umap_local(caller_ptr, D, (vir_bytes) table, size * sizeof(*table)))) { + printf("mini_senda: umap_local failed; 0x%lx len 0x%lx\n", + table, size * sizeof(*table)); return EFAULT; } diff --git a/kernel/system/do_exec.c b/kernel/system/do_exec.c index 0bffb7f64..b2284aadf 100644 --- a/kernel/system/do_exec.c +++ b/kernel/system/do_exec.c @@ -32,12 +32,8 @@ register message *m_ptr; /* pointer to request message */ rp = proc_addr(proc); if(rp->p_misc_flags & MF_DELIVERMSG) { - printf("%s / %d has MF_DELIVERMSG on during exec - clearing.\n", - rp->p_name, rp->p_endpoint); -#if 1 rp->p_misc_flags &= ~MF_DELIVERMSG; rp->p_delivermsg_lin = 0; -#endif } /* Save command name for debugging, ps(1) output, etc. */ diff --git a/servers/vm/alloc.c b/servers/vm/alloc.c index bf04f1b44..6348019f0 100644 --- a/servers/vm/alloc.c +++ b/servers/vm/alloc.c @@ -408,8 +408,6 @@ struct memory *chunks; /* list of free memory chunks */ } CHECKHOLES; - - FIXME("below 16MB allocation not done"); } /*===========================================================================* diff --git a/servers/vm/main.c b/servers/vm/main.c index 954281b61..23bbede36 100644 --- a/servers/vm/main.c +++ b/servers/vm/main.c @@ -262,14 +262,11 @@ PRIVATE void vm_init(void) * mapping. VM has its own pagetable, * don't check it. */ - printf("VM: not giving %d its own pt\n", - vmp->vm_endpoint); if(!(vmp->vm_flags & VMF_HASPT)) { pt_check(vmp); } continue; } - printf("VM: giving %d its own pt\n", vmp->vm_endpoint); old_stack = vmp->vm_arch.vm_seg[S].mem_vir +