-
Notifications
You must be signed in to change notification settings - Fork 0
/
kvraw.h
37 lines (28 loc) · 847 Bytes
/
kvraw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Tony Givargis
* Copyright (C), 2023
* University of California, Irvine
*
* CS 238P - Operating Systems
* kvraw.h
*/
#ifndef _KVRAW_H_
#define _KVRAW_H_
#include "system.h"
struct kvraw;
struct kvraw *kvraw_open(const char *pathname);
void kvraw_close(struct kvraw *kvraw);
int kvraw_lookup(struct kvraw *kvraw,
void *key,
uint64_t *key_len, /* in/out */
void *val,
uint64_t *val_len, /* in/out */
uint64_t *off); /* in/out */
int kvraw_append(struct kvraw *kvraw,
const void *key,
uint64_t key_len,
const void *val,
uint64_t val_len,
uint64_t *off);
uint64_t kvraw_size(struct kvraw *kvraw);
#endif /* _KVRAW_H_ */