13235Sraf/* 23235Sraf * CDDL HEADER START 33235Sraf * 43235Sraf * The contents of this file are subject to the terms of the 53235Sraf * Common Development and Distribution License (the "License"). 63235Sraf * You may not use this file except in compliance with the License. 73235Sraf * 83235Sraf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93235Sraf * or http://www.opensolaris.org/os/licensing. 103235Sraf * See the License for the specific language governing permissions 113235Sraf * and limitations under the License. 123235Sraf * 133235Sraf * When distributing Covered Code, include this CDDL HEADER in each 143235Sraf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153235Sraf * If applicable, add the following below this CDDL HEADER, with the 163235Sraf * fields enclosed by brackets "[]" replaced with your own identifying 173235Sraf * information: Portions Copyright [yyyy] [name of copyright owner] 183235Sraf * 193235Sraf * CDDL HEADER END 203235Sraf */ 213235Sraf 223235Sraf/* Copyright (c) 1988 AT&T */ 233235Sraf/* All Rights Reserved */ 243235Sraf 253235Sraf/* 263235Sraf * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 273235Sraf * Use is subject to license terms. 283235Sraf */ 293235Sraf 30*7298SMark.J.Nelson@Sun.COM .file "forkallx.s" 313235Sraf 323235Sraf#include "SYS.h" 333235Sraf 343235Sraf/* 353235Sraf * pid = __forkallx(flags); 363235Sraf * 373235Sraf * syscall trap: forksys(1, flags) 383235Sraf * 393235Sraf * From the syscall: 403235Sraf * %o1 == 0 in parent process, %o1 == 1 in child process. 413235Sraf * %o0 == pid of child in parent, %o0 == pid of parent in child. 423235Sraf * 433235Sraf * The child gets a zero return value. 443235Sraf * The parent gets the pid of the child. 453235Sraf */ 463235Sraf 473235Sraf ENTRY(__forkallx) 483235Sraf mov %o0, %o1 493235Sraf mov 1, %o0 503235Sraf SYSTRAP_2RVALS(forksys) 513235Sraf SYSCERROR 523235Sraf movrnz %o1, 0, %o0 533235Sraf RET 543235Sraf SET_SIZE(__forkallx) 55