HPCToolkit
OSUtil.c File Reference
#include <sys/types.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "OSUtil.h"
#include <include/linux_info.h>
Include dependency graph for OSUtil.c:

Go to the source code of this file.

Macros

#define __USE_XOPEN_EXTENDED
 
#define KERNEL_NAME_FORMAT   "%s." HOSTID_FORMAT
 
#define OSUtil_hostid_NULL   (-1)
 
#define OSUtil_hostid_fail   (0x0bad1d);
 

Functions

uint OSUtil_pid ()
 
const char * OSUtil_jobid ()
 
static void hostid_fpe_handler (int sig)
 
long OSUtil_hostid ()
 
int OSUtil_setCustomKernelName (char *buffer, size_t max_chars)
 
int OSUtil_setCustomKernelNameWrap (char *buffer, size_t max_chars)
 

Variables

static sigjmp_buf hostid_jbuf
 
static int hostid_jbuf_active
 

Macro Definition Documentation

◆ __USE_XOPEN_EXTENDED

#define __USE_XOPEN_EXTENDED

Definition at line 73 of file OSUtil.c.

◆ KERNEL_NAME_FORMAT

#define KERNEL_NAME_FORMAT   "%s." HOSTID_FORMAT

Definition at line 83 of file OSUtil.c.

◆ OSUtil_hostid_fail

#define OSUtil_hostid_fail   (0x0bad1d);

Definition at line 145 of file OSUtil.c.

◆ OSUtil_hostid_NULL

#define OSUtil_hostid_NULL   (-1)

Definition at line 144 of file OSUtil.c.

Function Documentation

◆ hostid_fpe_handler()

static void hostid_fpe_handler ( int  sig)
static

Definition at line 151 of file OSUtil.c.

Here is the caller graph for this function:

◆ OSUtil_hostid()

long OSUtil_hostid ( )

Definition at line 162 of file OSUtil.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OSUtil_jobid()

const char* OSUtil_jobid ( )

Definition at line 100 of file OSUtil.c.

Here is the caller graph for this function:

◆ OSUtil_pid()

uint OSUtil_pid ( )

Definition at line 92 of file OSUtil.c.

Here is the caller graph for this function:

◆ OSUtil_setCustomKernelName()

int OSUtil_setCustomKernelName ( char *  buffer,
size_t  max_chars 
)

Definition at line 198 of file OSUtil.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OSUtil_setCustomKernelNameWrap()

int OSUtil_setCustomKernelNameWrap ( char *  buffer,
size_t  max_chars 
)

Definition at line 208 of file OSUtil.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hostid_jbuf

sigjmp_buf hostid_jbuf
static

Definition at line 147 of file OSUtil.c.

◆ hostid_jbuf_active

int hostid_jbuf_active
static

Definition at line 148 of file OSUtil.c.