Go to the source code of this file.
◆ __MOTR_LIB_USER_SPACE_MISC_H__
#define __MOTR_LIB_USER_SPACE_MISC_H__ |
◆ ARRAY_SIZE
#define ARRAY_SIZE |
( |
|
a | ) |
((sizeof (a)) / (sizeof (a)[0])) |
size of array
Definition at line 45 of file misc.h.
◆ container_of
#define container_of |
( |
|
ptr, |
|
|
|
type, |
|
|
|
member |
|
) |
| ((type *)((char *)(ptr)-(char *)(&((type *)0)->member))) |
◆ NULL
◆ offsetof
#define offsetof |
( |
|
typ, |
|
|
|
memb |
|
) |
| __builtin_offsetof(typ, memb) |
◆ m0_host_resolve()
M0_INTERNAL int m0_host_resolve |
( |
const char * |
name, |
|
|
char * |
buf, |
|
|
size_t |
bufsiz |
|
) |
| |
Resolve hostname.
Resolve a hostname to a stringified IP address
Definition at line 49 of file umisc.c.
◆ 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.