tst.index.d revision 178476
1102644Snectar/*
2102644Snectar * CDDL HEADER START
3102644Snectar *
4102644Snectar * The contents of this file are subject to the terms of the
5102644Snectar * Common Development and Distribution License (the "License").
6102644Snectar * You may not use this file except in compliance with the License.
7102644Snectar *
8102644Snectar * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9102644Snectar * or http://www.opensolaris.org/os/licensing.
10102644Snectar * See the License for the specific language governing permissions
11102644Snectar * and limitations under the License.
12102644Snectar *
13102644Snectar * When distributing Covered Code, include this CDDL HEADER in each
14102644Snectar * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15102644Snectar * If applicable, add the following below this CDDL HEADER, with the
16102644Snectar * fields enclosed by brackets "[]" replaced with your own identifying
17102644Snectar * information: Portions Copyright [yyyy] [name of copyright owner]
18102644Snectar *
19102644Snectar * CDDL HEADER END
20102644Snectar */
21102644Snectar
22102644Snectar/*
23102644Snectar * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24102644Snectar * Use is subject to license terms.
25102644Snectar */
26102644Snectar
27102644Snectar#pragma ident	"%Z%%M%	%I%	%E% SMI"
28102644Snectar
29102644Snectar#pragma D option bufsize=1000
30102644Snectar#pragma D option bufpolicy=ring
31102644Snectar#pragma D option statusrate=10ms
32102644Snectar
33102644Snectarfbt:::
34102644Snectar{
35127808Snectar	on = (timestamp / 1000000000) & 1;
36102644Snectar}
37102644Snectar
38102644Snectarfbt:::
39102644Snectar/on/
40102644Snectar{
41102644Snectar	trace(index((char *)rand(), (char *)(rand() ^ vtimestamp)));
42102644Snectar}
43102644Snectar
44102644Snectarfbt:::
45102644Snectar/on/
46102644Snectar{
47102644Snectar	trace(rindex((char *)rand(), (char *)(rand() ^ vtimestamp,
48102644Snectar	    timestamp)));
49102644Snectar}
50102644Snectar
51102644Snectarfbt:::entry
52102644Snectar/on/
53102644Snectar{
54102644Snectar	trace(index((char *)arg0, (char *)arg1, rand()));
55102644Snectar}
56102644Snectar
57102644Snectarfbt:::entry
58102644Snectar/on/
59102644Snectar{
60102644Snectar	trace(rindex((char *)arg0, (char *)arg1));
61102644Snectar}
62102644Snectar
63127808Snectartick-1sec
64102644Snectar/n++ == 10/
65102644Snectar{
66102644Snectar	exit(0);
67102644Snectar}
68102644Snectar