ECP-VELOC Components
User documentation for all components
|
Go to the documentation of this file.
11 #ifndef KVTREE_MAX_LINE
12 #define KVTREE_MAX_LINE (1024)
16 #if defined(__APPLE__)
17 #include "machine/endian.h"
22 #ifdef HAVE_BYTESWAP_H
25 #include "kvtree_byteswap.h"
28 #if __BYTE_ORDER == __LITTLE_ENDIAN
29 #ifdef HAVE_BYTESWAP_H
30 # define kvtree_ntoh16(x) bswap_16(x)
31 # define kvtree_ntoh32(x) bswap_32(x)
32 # define kvtree_ntoh64(x) bswap_64(x)
33 # define kvtree_hton16(x) bswap_16(x)
34 # define kvtree_hton32(x) bswap_32(x)
35 # define kvtree_hton64(x) bswap_64(x)
37 # define kvtree_ntoh16(x) kvtree_bswap_16(x)
38 # define kvtree_ntoh32(x) kvtree_bswap_32(x)
39 # define kvtree_ntoh64(x) kvtree_bswap_64(x)
40 # define kvtree_hton16(x) kvtree_bswap_16(x)
41 # define kvtree_hton32(x) kvtree_bswap_32(x)
42 # define kvtree_hton64(x) kvtree_bswap_64(x)
45 # define kvtree_ntoh16(x) (x)
46 # define kvtree_ntoh32(x) (x)
47 # define kvtree_ntoh64(x) (x)
48 # define kvtree_hton16(x) (x)
49 # define kvtree_hton32(x) (x)
50 # define kvtree_hton64(x) (x)
53 #define KVTREE_OPEN_TRIES (5)
54 #define KVTREE_OPEN_USLEEP (100)
78 int kvtree_lseek(
const char* file,
int fd, off_t pos,
int whence);
int kvtree_open(const char *file, int flags,...)
int kvtree_open_with_lock(const char *file, int flags, mode_t mode, int write)
int kvtree_lseek(const char *file, int fd, off_t pos, int whence)
mode_t kvtree_getmode(int read, int write, int execute)
int kvtree_close(const char *file, int fd)
int kvtree_file_unlock(const char *file, int fd)
ssize_t kvtree_write_attempt(const char *file, int fd, const void *buf, size_t size)
int kvtree_file_lock_write(const char *file, int fd)
int kvtree_file_is_readable(const char *file)
ssize_t kvtree_read_attempt(const char *file, int fd, void *buf, size_t size)
int kvtree_close_with_unlock(const char *file, int fd)