comparison src/proc.c @ 19:bf2f70fa8852

fix proc.c not generate memcpy4
author tobaru
date Thu, 05 Apr 2018 12:10:21 +0900
parents 83c23a36980d
children 397e74cbf14e
comparison
equal deleted inserted replaced
18:d058830337d9 19:bf2f70fa8852
194 return -1; 194 return -1;
195 } 195 }
196 196
197 np->sz = proc->sz; 197 np->sz = proc->sz;
198 np->parent = proc; 198 np->parent = proc;
199 *np->tf = *proc->tf; 199 // *np->tf = *proc->tf; // This generate memcpy4 which is not in libgcc.a
200 memmove(np->tf, proc->tf, sizeof(*np->tf));
200 201
201 // Clear r0 so that fork returns 0 in the child. 202 // Clear r0 so that fork returns 0 in the child.
202 np->tf->r0 = 0; 203 np->tf->r0 = 0;
203 204
204 for(i = 0; i < NOFILE; i++) { 205 for(i = 0; i < NOFILE; i++) {