#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
◆ __MOTR_ST_ST_MISC_H__
#define __MOTR_ST_ST_MISC_H__ |
◆ LOG_PREFIX
◆ MEM_ALLOC_ARR
#define MEM_ALLOC_ARR |
( |
|
arr, |
|
|
|
nr |
|
) |
| ((arr) = mem_alloc((nr) * sizeof ((arr)[0]))) |
◆ MEM_ALLOC_PTR
◆ str_dup
#define str_dup |
( |
|
s | ) |
strdup((s)) |
◆ str_eq
#define str_eq |
( |
|
a, |
|
|
|
b |
|
) |
| (strcmp((a), (b)) == 0) |
◆ anonymous enum
Enumerator |
---|
TIME_ONE_SECOND | |
TIME_ONE_MSEC | |
Definition at line 60 of file st_misc.h.
◆ console_printf()
void console_printf |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ generate_random()
uint32_t generate_random |
( |
uint32_t |
max | ) |
|
◆ get_tid()
◆ mem_alloc()
void* mem_alloc |
( |
size_t |
size | ) |
|
◆ mem_free()
void mem_free |
( |
void * |
p | ) |
|
◆ time_from_now()
uint64_t time_from_now |
( |
uint64_t |
secs, |
|
|
uint64_t |
ns |
|
) |
| |
◆ time_nanoseconds()
uint64_t time_nanoseconds |
( |
const uint64_t |
time | ) |
|
◆ 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.
◆ time_seconds()
uint64_t time_seconds |
( |
const uint64_t |
time | ) |
|