]>
git.saurik.com Git - apple/xnu.git/blob - tools/tests/libMicro/apple/lm_null_call.c
825c14c7d3e443365f88df917e725dbf4f0dc0f8
2 * Copyright (c) 2006 Apple Inc. All Rights Reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
39 * benchmark_initworker
45 * benchmark_finibatch, etc.
46 * benchmark_finiworker
58 #pragma ident "@(#)socket.c 1.3 05/08/04 Apple Inc."
67 #include "../libmicro.h"
70 * Your state variables should live in the tsd_t struct below
79 benchmark_initbatch(void *tsd
)
94 * the lm_optstr must be defined here or no options for you
96 * ...and the framework will throw an error
99 (void) sprintf(lm_optstr
, "t:");
101 * working hypothesis:
103 * tsd_t is the struct that we can pass around our
106 * will allocate the space we need for this
107 * structure throughout the rest of the framework
109 lm_tsdsize
= sizeof (tsd_t
);
111 (void) sprintf(lm_usage
,
112 " [-t int (default 1)]\n"
113 "notes: measures nothing\n");
120 (void) fprintf(stderr
, "benchmark_fini\n");
125 benchmark_finibatch(void *tsd
)
133 static char result
= '\0';
134 (void) fprintf(stderr
, "null_call (getppid)\n");
139 benchmark_finiworker(void *tsd
)
145 benchmark_optswitch(int opt
, char *optarg
)
151 benchmark_initworker(void *tsd
)
154 * initialize your state variables here first
166 benchmark(void *tsd
, result_t
*res
)
169 * initialize your state variables here last
171 * and realize that you are paying for your initialization here
172 * and it is really a bad idea
176 for (i
= 0; i
< lm_optB
; i
++) {
178 * just to show that ts really contains state