Motr  M0
umisc.c File Reference
#include <stdlib.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdio.h>
#include "lib/misc.h"
#include "lib/trace.h"
Include dependency graph for umisc.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

uint64_t m0_strtou64 (const char *str, char **endptr, int base)
 
uint32_t m0_strtou32 (const char *str, char **endptr, int base)
 
M0_INTERNAL int m0_host_resolve (const char *name, char *buf, size_t bufsiz)
 
M0_INTERNAL void m0_performance_counters (char *buf, size_t buf_len)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB

Definition at line 33 of file umisc.c.

Function Documentation

◆ m0_host_resolve()

M0_INTERNAL int m0_host_resolve ( const char *  name,
char *  buf,
size_t  bufsiz 
)

Resolve a hostname to a stringified IP address

Definition at line 49 of file umisc.c.

Here is the call graph for this function:

◆ m0_performance_counters()

M0_INTERNAL void m0_performance_counters ( char *  buf,
size_t  buf_len 
)

Print performance counters: getrusage(), /proc/self/io.

All errors (can't open file etc.) are silently ignored.

Definition at line 82 of file umisc.c.

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

◆ m0_strtou32()

uint32_t m0_strtou32 ( const char *  str,
char **  endptr,
int  base 
)

Definition at line 42 of file umisc.c.

◆ m0_strtou64()

uint64_t m0_strtou64 ( const char *  str,
char **  endptr,
int  base 
)

Definition at line 36 of file umisc.c.