tst.substr.d revision 178476
1235368Sgnn/*
2235368Sgnn * CDDL HEADER START
3235368Sgnn *
4235368Sgnn * The contents of this file are subject to the terms of the
5235368Sgnn * Common Development and Distribution License (the "License").
6235368Sgnn * You may not use this file except in compliance with the License.
7235368Sgnn *
8235368Sgnn * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9235368Sgnn * or http://www.opensolaris.org/os/licensing.
10235368Sgnn * See the License for the specific language governing permissions
11235368Sgnn * and limitations under the License.
12235368Sgnn *
13235368Sgnn * When distributing Covered Code, include this CDDL HEADER in each
14235368Sgnn * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15235368Sgnn * If applicable, add the following below this CDDL HEADER, with the
16235368Sgnn * fields enclosed by brackets "[]" replaced with your own identifying
17235368Sgnn * information: Portions Copyright [yyyy] [name of copyright owner]
18235368Sgnn *
19235368Sgnn * CDDL HEADER END
20235368Sgnn */
21235368Sgnn
22235368Sgnn/*
23235368Sgnn * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24235368Sgnn * Use is subject to license terms.
25235368Sgnn */
26235368Sgnn
27#pragma ident	"%Z%%M%	%I%	%E% SMI"
28
29#pragma D option bufsize=1000
30#pragma D option bufpolicy=ring
31#pragma D option statusrate=10ms
32
33fbt:::
34{
35	on = (timestamp / 1000000000) & 1;
36}
37
38fbt:::
39/on/
40{
41	trace(substr((char *)rand(), rand() ^ vtimestamp));
42}
43
44fbt:::
45/on/
46{
47	trace(substr((char *)rand(), -rand() ^ vtimestamp));
48}
49
50tick-1sec
51/n++ == 10/
52{
53	exit(0);
54}
55