kern_fork.c (2244ea07dc9813b20e9bfd82568ca66415da4f67) kern_fork.c (e384a9801ec6e9e0bbe5fa03655db40a6e083135)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
39 * $Id: kern_fork.c,v 1.44 1997/06/22 16:04:13 peter Exp $
39 * $Id: kern_fork.c,v 1.45 1997/07/06 02:40:41 dyson Exp $
40 */
41
42#include "opt_ktrace.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/sysproto.h>
47#include <sys/filedesc.h>

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

146 /*
147 * FATAL now, we cannot have the same PTD on both cpus, the PTD
148 * needs to move out of PTmap and be per-process, even for shared
149 * page table processes. Unfortunately, this means either removing
150 * PTD[] as a fixed virtual address, or move it to the per-cpu map
151 * area for SMP mode. Both cases require seperate management of
152 * the per-process-even-if-PTmap-is-shared PTD.
153 */
40 */
41
42#include "opt_ktrace.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/sysproto.h>
47#include <sys/filedesc.h>

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

146 /*
147 * FATAL now, we cannot have the same PTD on both cpus, the PTD
148 * needs to move out of PTmap and be per-process, even for shared
149 * page table processes. Unfortunately, this means either removing
150 * PTD[] as a fixed virtual address, or move it to the per-cpu map
151 * area for SMP mode. Both cases require seperate management of
152 * the per-process-even-if-PTmap-is-shared PTD.
153 */
154 if (flags & RFMEM)
154 if (flags & RFMEM) {
155 printf("shared address space fork attempted: pid: %d\n",
156 p1->p_pid);
155 return (EOPNOTSUPP);
157 return (EOPNOTSUPP);
158 }
156#endif
157
158 /*
159 * Here we don't create a new process, but we divorce
160 * certain parts of a process from itself.
161 */
162 if ((flags & RFPROC) == 0) {
163

--- 337 unchanged lines hidden ---
159#endif
160
161 /*
162 * Here we don't create a new process, but we divorce
163 * certain parts of a process from itself.
164 */
165 if ((flags & RFPROC) == 0) {
166

--- 337 unchanged lines hidden ---