Motr  M0
st_misc.c File Reference
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <stdbool.h>
#include "motr/st/st_assert.h"
#include "motr/st/st_misc.h"
#include "lib/memory.h"
Include dependency graph for st_misc.c:

Go to the source code of this file.

Functions

uint64_t time_now (void)
 
uint64_t time_seconds (const uint64_t time)
 
uint64_t time_nanoseconds (const uint64_t time)
 
uint64_t time_from_now (uint64_t secs, uint64_t ns)
 
void * mem_alloc (size_t size)
 
void mem_free (void *p)
 
pid_t get_tid (void)
 
void console_printf (const char *fmt,...)
 
uint32_t generate_random (uint32_t max)
 

Function Documentation

◆ console_printf()

void console_printf ( const char *  fmt,
  ... 
)

Definition at line 155 of file st_misc.c.

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

◆ generate_random()

uint32_t generate_random ( uint32_t  max)

Definition at line 164 of file st_misc.c.

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

◆ get_tid()

pid_t get_tid ( void  )

Helper functions

Definition at line 150 of file st_misc.c.

Here is the caller graph for this function:

◆ mem_alloc()

void* mem_alloc ( size_t  size)

Definition at line 99 of file st_misc.c.

Here is the call graph for this function:

◆ mem_free()

void mem_free ( void *  p)

Definition at line 113 of file st_misc.c.

Here is the call graph for this function:

◆ time_from_now()

uint64_t time_from_now ( uint64_t  secs,
uint64_t  ns 
)

Definition at line 89 of file st_misc.c.

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

◆ time_nanoseconds()

uint64_t time_nanoseconds ( const uint64_t  time)

Definition at line 84 of file st_misc.c.

Here is the caller graph for this function:

◆ time_now()

uint64_t time_now ( void  )

Helper functions for Client ST in both user space and kernel

Definition at line 69 of file st_misc.c.

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

◆ time_seconds()

uint64_t time_seconds ( const uint64_t  time)

Definition at line 79 of file st_misc.c.

Here is the caller graph for this function: