libfuse
util.h
1#ifndef FUSE_UTIL_H_
2#define FUSE_UTIL_H_
3
4#include <stdint.h>
5
6#define ROUND_UP(val, round_to) (((val) + (round_to - 1)) & ~(round_to - 1))
7
8int libfuse_strtol(const char *str, long *res);
9
13static inline uint32_t fuse_lower_32_bits(uint64_t nr)
14{
15 return (uint32_t)(nr & 0xffffffff);
16}
17
21static inline uint64_t fuse_higher_32_bits(uint64_t nr)
22{
23 return nr & ~0xffffffffULL;
24}
25
26#ifndef FUSE_VAR_UNUSED
27#define FUSE_VAR_UNUSED(var) (__attribute__((unused)) var)
28#endif
29
30#endif