xref: /illumos-gate/usr/src/man/man3papi/papiStatusString.3papi (revision 81b2d5738d8e67bdf2438cd3e8c79f379bce44d2)
te
Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
papiStatusString 3PAPI "17 Jan 2007" "SunOS 5.11" "PAPI Library Functions"
NAME
papiStatusString - return the string equivalent of a papi_status_t
SYNOPSIS

cc [ flag.\|.\|. ] file.\|.\|. -lpapi [ library.\|.\|. ] 
#include <papi.h>

char *papiStatusString(papi_status_t status);
PARAMETERS

status

a papi_status_t returned from most papi*() functions

DESCRIPTION

The papiStatusString() function takes a status value and returns a localized human-readable version of the supplied status.

RETURN VALUES

The papiStatusString() function always returns a text string.

ERRORS

None.

EXAMPLES

Example 1 Print status.

#include <stdio.h>
#include <papi.h>

/*ARGSUSED*/
int
main(int ac, char *av[])
{

 printf("status: %s\en", papiStatusString(PAPI_OK));
 printf("status: %s\en", papiStatusString(PAPI_DEVICE_ERROR));
 printf("status: %s\en", papiStatusString(PAPI_DOCUMENT_ACCESS_ERROR));

 exit(0);
}
ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityVolatile
MT-LevelSafe
SEE ALSO

libpapi(3LIB), attributes(5)