DAOS API
(v2.1 - dev)
Toggle main menu visibility
Loading...
Searching...
No Matches
daos_api.h
Go to the documentation of this file.
1
/*
2
* (C) Copyright 2015-2024 Intel Corporation.
3
*
4
* SPDX-License-Identifier: BSD-2-Clause-Patent
5
*/
11
12
#ifndef __DAOS_API_H__
13
#define __DAOS_API_H__
14
15
#if defined(__cplusplus)
16
extern
"C"
{
17
#endif
18
19
#include <daos_types.h>
20
22
enum
{
24
DAOS_TF_RDONLY
= (1 << 0),
33
DAOS_TF_ZERO_COPY
= (1 << 1),
34
};
35
47
d_rank_list_t *
daos_rank_list_parse
(
const
char
*str,
const
char
*sep);
48
49
/*
50
* Transaction API
51
*/
52
70
int
71
daos_tx_open
(
daos_handle_t
coh,
daos_handle_t
*th, uint64_t flags,
72
daos_event_t *ev);
73
92
int
93
daos_tx_commit
(
daos_handle_t
th, daos_event_t *ev);
94
110
int
111
daos_tx_open_snap
(
daos_handle_t
coh, daos_epoch_t epoch,
daos_handle_t
*th,
112
daos_event_t *ev);
113
124
int
125
daos_tx_abort
(
daos_handle_t
th, daos_event_t *ev);
126
136
int
137
daos_tx_close
(
daos_handle_t
th, daos_event_t *ev);
138
154
int
155
daos_tx_restart
(
daos_handle_t
th, daos_event_t *ev);
156
171
int
172
daos_tx_hdl2epoch
(
daos_handle_t
th, daos_epoch_t *epoch);
173
180
static
inline
int
181
daos_anchor_init(
daos_anchor_t
*anchor, __attribute__((unused))
unsigned
int
opts)
182
{
183
daos_anchor_t
_anchor = DAOS_ANCHOR_INIT;
184
185
*anchor = _anchor;
186
return
0;
187
}
188
195
static
inline
void
196
daos_anchor_fini(__attribute__((unused))
daos_anchor_t
*anchor)
197
{
198
/* NOOP for now, might need to free memory */
199
}
200
204
static
inline
bool
205
daos_anchor_is_eof(
daos_anchor_t
*anchor)
206
{
207
return
anchor->
da_type
== DAOS_ANCHOR_TYPE_EOF;
208
}
209
219
int
220
daos_hlc2timespec
(uint64_t hlc,
struct
timespec *ts);
221
232
int
233
daos_hlc2timestamp
(uint64_t hlc, time_t *ts);
234
235
#if defined(__cplusplus)
236
}
237
#endif
238
#endif
/* __DAOS_API_H__ */
DAOS_TF_ZERO_COPY
@ DAOS_TF_ZERO_COPY
Definition
daos_api.h:33
DAOS_TF_RDONLY
@ DAOS_TF_RDONLY
Definition
daos_api.h:24
daos_tx_hdl2epoch
int daos_tx_hdl2epoch(daos_handle_t th, daos_epoch_t *epoch)
daos_tx_abort
int daos_tx_abort(daos_handle_t th, daos_event_t *ev)
daos_tx_commit
int daos_tx_commit(daos_handle_t th, daos_event_t *ev)
daos_hlc2timespec
int daos_hlc2timespec(uint64_t hlc, struct timespec *ts)
daos_tx_open
int daos_tx_open(daos_handle_t coh, daos_handle_t *th, uint64_t flags, daos_event_t *ev)
daos_hlc2timestamp
int daos_hlc2timestamp(uint64_t hlc, time_t *ts)
daos_rank_list_parse
d_rank_list_t * daos_rank_list_parse(const char *str, const char *sep)
daos_tx_restart
int daos_tx_restart(daos_handle_t th, daos_event_t *ev)
daos_tx_close
int daos_tx_close(daos_handle_t th, daos_event_t *ev)
daos_tx_open_snap
int daos_tx_open_snap(daos_handle_t coh, daos_epoch_t epoch, daos_handle_t *th, daos_event_t *ev)
daos_anchor_t
Definition
daos_types.h:60
daos_anchor_t::da_type
uint16_t da_type
Definition
daos_types.h:61
daos_handle_t
Definition
daos_types.h:75
src
include
daos_api.h
Generated by
1.17.0