diff options
author | gnn <gnn@FreeBSD.org> | 2014-07-31 18:02:38 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2014-07-31 18:02:38 +0000 |
commit | 37ce71f3e92aefea56a7963f9d0d18440b730670 (patch) | |
tree | 316fe4782204403f4acfd87d4697e566f682f731 | |
parent | 8bdfc1896d7dd079283b90589f3992dd9bfd3843 (diff) | |
download | FreeBSD-src-37ce71f3e92aefea56a7963f9d0d18440b730670.zip FreeBSD-src-37ce71f3e92aefea56a7963f9d0d18440b730670.tar.gz |
Various style(9) and related fixes.
Update the copyright to be more in line with the current version in
our tree.
Remove the ancient rcsid.
Add a proper return from the main function
Pointed out by: bz
-rw-r--r-- | share/examples/hwpmc/overhead.c | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/share/examples/hwpmc/overhead.c b/share/examples/hwpmc/overhead.c index 0d99234..14834bd 100644 --- a/share/examples/hwpmc/overhead.c +++ b/share/examples/hwpmc/overhead.c @@ -1,45 +1,34 @@ -/* +/*- * Copyright (c) 2014, Neville-Neil Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of Neville-Neil Consulting nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * $FreeBSD$ * * Author: George V. Neville-Neil * - * */ -#ifndef lint -static char rcsid [] = "$Header:$" ; -#endif - /* * Calculate the time overhead of starting, stopping, and recording * pmc counters. @@ -59,7 +48,8 @@ static char rcsid [] = "$Header:$" ; #include <machine/cpufunc.h> #include <pmc.h> -int main(int argc, char **argv) +int +main(int argc, char **argv) { pmc_id_t pmcid; pmc_value_t read_value; @@ -111,5 +101,6 @@ int main(int argc, char **argv) printf("Cycles to start: %ld\tstop: %ld\tread: %ld\twrite: %ld\n", start_cyc, stop_cyc, read_cyc, stop_cyc); + return(0); } |