/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* rseq implementation
*/
#ifdef _KERNEL
static long rseq_random();
#else
#include <assert.h>
#include <stdlib.h>
#endif
/*ARGSUSED*/
static int
{
int i;
rseq_step_t *s;
for (i = 0; i < num; i++) {
continue;
}
break;
} else if (rval == RSEQ_ABORT) {
break;
}
}
return (rval);
}
/*ARGSUSED*/
static int
{
int i;
rseq_step_t *s;
for (i = num - 1; i >= 0; i--) {
continue;
}
if (rval == RSEQ_ABORT) {
break;
}
}
return (rval);
}
int
{
}
int
{
}
#ifdef DEBUG
#ifndef __lock_lint
static int
{
switch (scenario) {
case RSEQ_DBG_FAIL_ONE:
break;
case RSEQ_DBG_FAIL_ONE_RANDOM:
break;
case RSEQ_DBG_FAIL_ONEBYONE:
for (i = 0; i < num; i++) {
/*
* when aborted, the undo path is not executed, so we
* can't continue without the risk of resource leakage.
*/
if (rval == RSEQ_ABORT) {
break;
}
}
break;
default:
ASSERT(!"rseq_debug: incorrect debug scenario");
rval = RSEQ_ABORT;
}
return (rval);
}
int
{
}
int
{
}
#ifdef _KERNEL
static long
{
return (ddi_get_lbolt());
}
#endif /* _KERNEL */
#endif /* __lock_lint */
#endif /* DEBUG */