err.D_COMM_COMM.CommitAftCommit.d revision 9512fe850e98fdd448c638ca63fdd92a8a510255
454N/A/*
454N/A * CDDL HEADER START
454N/A *
454N/A * The contents of this file are subject to the terms of the
454N/A * Common Development and Distribution License (the "License").
454N/A * You may not use this file except in compliance with the License.
454N/A *
454N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
454N/A * or http://www.opensolaris.org/os/licensing.
454N/A * See the License for the specific language governing permissions
454N/A * and limitations under the License.
454N/A *
454N/A * When distributing Covered Code, include this CDDL HEADER in each
454N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
454N/A * If applicable, add the following below this CDDL HEADER, with the
454N/A * fields enclosed by brackets "[]" replaced with your own identifying
454N/A * information: Portions Copyright [yyyy] [name of copyright owner]
454N/A *
454N/A * CDDL HEADER END
454N/A */
454N/A
5904N/A/*
454N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
454N/A * Use is subject to license terms.
454N/A */
454N/A
454N/A#pragma ident "%Z%%M% %I% %E% SMI"
7163N/A
4367N/A/*
1273N/A * ASSERTION:
1273N/A * A clause cannot contain multiple commit() calls to same buffer.
7163N/A *
586N/A * SECTION: Speculative Tracing/Committing a Speculation;
5093N/A * Options and Tunables/cleanrate
3661N/A */
454N/A#pragma D option quiet
454N/A#pragma D option cleanrate=3000
454N/A
454N/ABEGIN
454N/A{
454N/A self->i = 0;
3996N/A var1 = 0;
454N/A}
2238N/A
2238N/Aprofile:::tick-1sec
454N/A/!var1/
454N/A{
454N/A var1 = speculation();
454N/A printf("Speculation ID: %d\n", var1);
454N/A}
454N/A
454N/Aprofile:::tick-1sec
454N/A/var1/
454N/A{
454N/A speculate(var1);
454N/A printf("Speculating on id: %d\n", var1);
454N/A self->i++;
454N/A}
454N/A
454N/Aprofile:::tick-1sec
454N/A/(!self->i)/
454N/A{
454N/A}
454N/A
454N/Aprofile:::tick-1sec
454N/A/(self->i)/
454N/A{
454N/A commit(var1);
commit(var1);
exit(0);
}
END
{
printf("Succesfully commited both buffers");
exit(0);
}
ERROR
{
exit(0);
}