From: John Hodge Date: Thu, 20 Oct 2011 13:13:42 +0000 (+0800) Subject: Kernel/armv7 - Fixing some unneeded errors X-Git-Tag: rel0.13~20 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=8561b715a6be8392cb658457159374d20b15b52f;p=tpg%2Facess2.git Kernel/armv7 - Fixing some unneeded errors --- diff --git a/Kernel/arch/armv7/mm_virt.c b/Kernel/arch/armv7/mm_virt.c index 03c8cc7d..53531d37 100644 --- a/Kernel/arch/armv7/mm_virt.c +++ b/Kernel/arch/armv7/mm_virt.c @@ -545,7 +545,11 @@ tPAddr MM_Clone(void) tmp_map = new_lvl1_1; for( i = 0; i < 0x800-4; i ++ ) { -// Log("i = %i", i); + // HACK! Ignore the original identity mapping + if( i == 0 && Threads_GetTID() == 0 ) { + tmp_map[0] = 0; + continue; + } if( i == 0x400 ) tmp_map = &new_lvl1_2[-0x400]; switch( cur[i] & 3 ) diff --git a/Kernel/arch/armv7/proc.c b/Kernel/arch/armv7/proc.c index d61160f0..a0a646b6 100644 --- a/Kernel/arch/armv7/proc.c +++ b/Kernel/arch/armv7/proc.c @@ -127,7 +127,7 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr ) new = Threads_CloneThreadZero(); if(!new) return -1; - free(new->ThreadName); + if(new->ThreadName) free(new->ThreadName); new->ThreadName = NULL; new->KernelStack = MM_NewKStack(1);