Deleted Added
full compact
vm_glue.c (42968) vm_glue.c (43208)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 45 unchanged lines hidden (view full) ---

54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
55 * School of Computer Science
56 * Carnegie Mellon University
57 * Pittsburgh PA 15213-3890
58 *
59 * any improvements or extensions that they make and grant Carnegie the
60 * rights to redistribute these changes.
61 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 45 unchanged lines hidden (view full) ---

54 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
55 * School of Computer Science
56 * Carnegie Mellon University
57 * Pittsburgh PA 15213-3890
58 *
59 * any improvements or extensions that they make and grant Carnegie the
60 * rights to redistribute these changes.
61 *
62 * $Id: vm_glue.c,v 1.81 1999/01/21 08:29:10 dillon Exp $
62 * $Id: vm_glue.c,v 1.82 1999/01/21 09:36:23 dillon Exp $
63 */
64
65#include "opt_rlimit.h"
66#include "opt_vm.h"
67
68#include <sys/param.h>
69#include <sys/systm.h>
70#include <sys/proc.h>

--- 162 unchanged lines hidden (view full) ---

233 if (p1->p_vmspace->vm_shm)
234 shmfork(p1, p2);
235 }
236
237 pmap_new_proc(p2);
238
239 up = p2->p_addr;
240
63 */
64
65#include "opt_rlimit.h"
66#include "opt_vm.h"
67
68#include <sys/param.h>
69#include <sys/systm.h>
70#include <sys/proc.h>

--- 162 unchanged lines hidden (view full) ---

233 if (p1->p_vmspace->vm_shm)
234 shmfork(p1, p2);
235 }
236
237 pmap_new_proc(p2);
238
239 up = p2->p_addr;
240
241#ifndef COMPAT_LINUX_THREADS
242 /*
241 /*
243 * p_stats and p_sigacts currently point at fields in the user struct
244 * but not at &u, instead at p_addr. Copy p_sigacts and parts of
245 * p_stats; zero the rest of p_stats (statistics).
246 */
247 p2->p_stats = &up->u_stats;
248 p2->p_sigacts = &up->u_sigacts;
249 up->u_sigacts = *p1->p_sigacts;
250#else
251 /*
252 * p_stats currently points at fields in the user struct
253 * but not at &u, instead at p_addr. Copy parts of
254 * p_stats; zero the rest of p_stats (statistics).
255 *
256 * If procsig->ps_refcnt is 1 and p2->p_sigacts is NULL we dont' need
257 * to share sigacts, so we use the up->u_sigacts.
258 */
259 p2->p_stats = &up->u_stats;
260 if (p2->p_sigacts == NULL) {
261 if (p2->p_procsig->ps_refcnt != 1)
262 printf ("PID:%d NULL sigacts with refcnt not 1!\n",p2->p_pid);
263 p2->p_sigacts = &up->u_sigacts;
264 up->u_sigacts = *p1->p_sigacts;
265 }
242 * p_stats currently points at fields in the user struct
243 * but not at &u, instead at p_addr. Copy parts of
244 * p_stats; zero the rest of p_stats (statistics).
245 *
246 * If procsig->ps_refcnt is 1 and p2->p_sigacts is NULL we dont' need
247 * to share sigacts, so we use the up->u_sigacts.
248 */
249 p2->p_stats = &up->u_stats;
250 if (p2->p_sigacts == NULL) {
251 if (p2->p_procsig->ps_refcnt != 1)
252 printf ("PID:%d NULL sigacts with refcnt not 1!\n",p2->p_pid);
253 p2->p_sigacts = &up->u_sigacts;
254 up->u_sigacts = *p1->p_sigacts;
255 }
266#endif /* COMPAT_LINUX_THREADS */
256
267 bzero(&up->u_stats.pstat_startzero,
268 (unsigned) ((caddr_t) &up->u_stats.pstat_endzero -
269 (caddr_t) &up->u_stats.pstat_startzero));
270 bcopy(&p1->p_stats->pstat_startcopy, &up->u_stats.pstat_startcopy,
271 ((caddr_t) &up->u_stats.pstat_endcopy -
272 (caddr_t) &up->u_stats.pstat_startcopy));
273
274

--- 265 unchanged lines hidden ---
257 bzero(&up->u_stats.pstat_startzero,
258 (unsigned) ((caddr_t) &up->u_stats.pstat_endzero -
259 (caddr_t) &up->u_stats.pstat_startzero));
260 bcopy(&p1->p_stats->pstat_startcopy, &up->u_stats.pstat_startcopy,
261 ((caddr_t) &up->u_stats.pstat_endcopy -
262 (caddr_t) &up->u_stats.pstat_startcopy));
263
264

--- 265 unchanged lines hidden ---