tst.SpeculateWithRandom.d revision 9512fe850e98fdd448c638ca63fdd92a8a510255
4126N/A/*
4126N/A * CDDL HEADER START
4126N/A *
4126N/A * The contents of this file are subject to the terms of the
4126N/A * Common Development and Distribution License (the "License").
4126N/A * You may not use this file except in compliance with the License.
4126N/A *
4126N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4126N/A * or http://www.opensolaris.org/os/licensing.
4126N/A * See the License for the specific language governing permissions
4126N/A * and limitations under the License.
4126N/A *
4126N/A * When distributing Covered Code, include this CDDL HEADER in each
4126N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4126N/A * If applicable, add the following below this CDDL HEADER, with the
4126N/A * fields enclosed by brackets "[]" replaced with your own identifying
4126N/A * information: Portions Copyright [yyyy] [name of copyright owner]
4126N/A *
4126N/A * CDDL HEADER END
4126N/A */
4126N/A
4126N/A/*
4126N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4126N/A * Use is subject to license terms.
4126N/A */
4126N/A
4126N/A#pragma ident "%Z%%M% %I% %E% SMI"
4126N/A
4126N/A/*
4126N/A * ASSERTION:
4126N/A * When speculate() is called with an inactive buffer number, it is
4126N/A * ignored.
4126N/A *
4126N/A * SECTION: Speculative Tracing/Creating a Speculation
4126N/A *
4126N/A */
4126N/A#pragma D option quiet
4126N/ABEGIN
4126N/A{
4126N/A self->i = 0;
4126N/A}
4126N/A
4126N/ABEGIN
4126N/A{
4126N/A speculate(3456710);
4126N/A self->i++;
4126N/A printf("self->i: %d\n", self->i);
4126N/A
4126N/A}
4126N/A
4126N/ABEGIN
4126N/A{
exit(0);
}
ERROR
{
exit(1);
}