PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
exec.c File Reference
Include dependency graph for exec.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 17 of file exec.c.

18 {
19  int retval;
20 
21  tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
22 
23  if ( ( argc > 1 ) && ( strcmp( argv[1], "xxx" ) == 0 ) ) {
25  if ( retval != PAPI_VER_CURRENT )
26  test_fail( __FILE__, __LINE__, "execed PAPI_library_init", retval );
27  } else {
29  if ( retval != PAPI_VER_CURRENT )
30  test_fail( __FILE__, __LINE__, "main PAPI_library_init", retval );
31 
32  PAPI_shutdown( );
33 
34  if ( execlp( argv[0], argv[0], "xxx", NULL ) == -1 )
35  test_fail( __FILE__, __LINE__, "execlp", PAPI_ESYS );
36  }
37 
38  test_pass( __FILE__, NULL, 0 );
39  exit( 1 );
40 }
tests_quiet(argc, argv)
test_pass(__FILE__, NULL, 0)
int int argc
Definition: iozone.c:1609
char ** argv
Definition: iozone.c:1610
test_fail(__FILE__, __LINE__,"PAPI_library_init", retval)
int PAPI_library_init(int version)
Definition: papi.c:497
void PAPI_shutdown(void)
Definition: papi.c:4400
#define PAPI_ESYS
Definition: papi.h:253
ssize_t retval
Definition: libasync.c:338
#define PAPI_VER_CURRENT
Definition: papi.h:223
void exit()

Here is the call graph for this function: