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-2022 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
20
enum
{
22
DAOS_TF_RDONLY
= (1 << 0),
31
DAOS_TF_ZERO_COPY
= (1 << 1),
32
};
33
45
d_rank_list_t *
daos_rank_list_parse
(
const
char
*str,
const
char
*sep);
46
47
/*
48
* Transaction API
49
*/
50
68
int
69
daos_tx_open
(
daos_handle_t
coh,
daos_handle_t
*th, uint64_t flags,
70
daos_event_t *ev);
71
90
int
91
daos_tx_commit
(
daos_handle_t
th, daos_event_t *ev);
92
108
int
109
daos_tx_open_snap
(
daos_handle_t
coh, daos_epoch_t epoch,
daos_handle_t
*th,
110
daos_event_t *ev);
111
122
int
123
daos_tx_abort
(
daos_handle_t
th, daos_event_t *ev);
124
134
int
135
daos_tx_close
(
daos_handle_t
th, daos_event_t *ev);
136
152
int
153
daos_tx_restart
(
daos_handle_t
th, daos_event_t *ev);
154
169
int
170
daos_tx_hdl2epoch
(
daos_handle_t
th, daos_epoch_t *epoch);
171
178
static
inline
int
179
daos_anchor_init(
daos_anchor_t
*anchor, __attribute__((unused))
unsigned
int
opts)
180
{
181
daos_anchor_t
_anchor = DAOS_ANCHOR_INIT;
182
183
*anchor = _anchor;
184
return
0;
185
}
186
193
static
inline
void
194
daos_anchor_fini(__attribute__((unused))
daos_anchor_t
*anchor)
195
{
196
/* NOOP for now, might need to free memory */
197
}
198
202
static
inline
bool
203
daos_anchor_is_eof(
daos_anchor_t
*anchor)
204
{
205
return
anchor->
da_type
== DAOS_ANCHOR_TYPE_EOF;
206
}
207
217
int
218
daos_hlc2timespec
(uint64_t hlc,
struct
timespec *ts);
219
230
int
231
daos_hlc2timestamp
(uint64_t hlc, time_t *ts);
232
233
#if defined(__cplusplus)
234
}
235
#endif
236
#endif
/* __DAOS_API_H__ */
DAOS_TF_ZERO_COPY
@ DAOS_TF_ZERO_COPY
Definition
daos_api.h:31
DAOS_TF_RDONLY
@ DAOS_TF_RDONLY
Definition
daos_api.h:22
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:58
daos_anchor_t::da_type
uint16_t da_type
Definition
daos_types.h:59
daos_handle_t
Definition
daos_types.h:73
src
include
daos_api.h
Generated by
1.17.0