xref: /freebsd/lib/libpmc/pmc_init.3 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1f28834c1SJoseph Koshy.\" Copyright (c) 2007 Joseph Koshy.  All rights reserved.
2f28834c1SJoseph Koshy.\"
3f28834c1SJoseph Koshy.\" Redistribution and use in source and binary forms, with or without
4f28834c1SJoseph Koshy.\" modification, are permitted provided that the following conditions
5f28834c1SJoseph Koshy.\" are met:
6f28834c1SJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright
7f28834c1SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer.
8f28834c1SJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright
9f28834c1SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer in the
10f28834c1SJoseph Koshy.\"    documentation and/or other materials provided with the distribution.
11f28834c1SJoseph Koshy.\"
12*026dbd29SChristian Brueffer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13*026dbd29SChristian Brueffer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14*026dbd29SChristian Brueffer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15*026dbd29SChristian Brueffer.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16*026dbd29SChristian Brueffer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17*026dbd29SChristian Brueffer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18*026dbd29SChristian Brueffer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19*026dbd29SChristian Brueffer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20*026dbd29SChristian Brueffer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21*026dbd29SChristian Brueffer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22*026dbd29SChristian Brueffer.\" SUCH DAMAGE.
23f28834c1SJoseph Koshy.\"
24f28834c1SJoseph Koshy.Dd November 24, 2007
25f28834c1SJoseph Koshy.Dt PMC_INIT 3
26aa12cea2SUlrich Spörlein.Os
27f28834c1SJoseph Koshy.Sh NAME
28f28834c1SJoseph Koshy.Nm pmc_init
29f28834c1SJoseph Koshy.Nd initialize library
30f28834c1SJoseph Koshy.Sh LIBRARY
31f28834c1SJoseph Koshy.Lb libpmc
32f28834c1SJoseph Koshy.Sh SYNOPSIS
33f28834c1SJoseph Koshy.In pmc.h
34f28834c1SJoseph Koshy.Ft int
35f28834c1SJoseph Koshy.Fn pmc_init void
36f28834c1SJoseph Koshy.Sh DESCRIPTION
37f28834c1SJoseph KoshyFunction
38f28834c1SJoseph Koshy.Fn pmc_init
39f28834c1SJoseph Koshyinitializes the PMC library.
40f28834c1SJoseph KoshyThis function must be called before any of the other functions in the
41f28834c1SJoseph Koshylibrary.
42f28834c1SJoseph Koshy.Sh RETURN VALUES
43f28834c1SJoseph Koshy.Rv -std pmc_init
44f28834c1SJoseph Koshy.Sh ERRORS
45f28834c1SJoseph KoshyA call to
46f28834c1SJoseph Koshy.Fn pmc_init
47f28834c1SJoseph Koshymay fail with the following errors:
48f28834c1SJoseph Koshy.Bl -tag -width Er
49f28834c1SJoseph Koshy.It Bq Er ENOENT
50f28834c1SJoseph KoshyThe
51f28834c1SJoseph Koshy.Xr hwpmc 4
52f28834c1SJoseph Koshymodule was not found in the kernel.
53f28834c1SJoseph Koshy.It Bq Er EPROGMISMATCH
54f28834c1SJoseph KoshyThe library's version number did not match that expected by
55f28834c1SJoseph Koshy.Xr hwpmc 4 .
56f28834c1SJoseph Koshy.It Bq Er ENXIO
57f28834c1SJoseph KoshyPMC hardware on this system is unsupported.
58f28834c1SJoseph Koshy.El
59f28834c1SJoseph Koshy.Sh SEE ALSO
60f28834c1SJoseph Koshy.Xr pmc 3 ,
61f28834c1SJoseph Koshy.Xr hwpmc 4
62