DAOS API (v2.1 - dev)
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 */
12#ifndef __DAOS_API_H__
13#define __DAOS_API_H__
14
15#if defined(__cplusplus)
16extern "C" {
17#endif
18
20enum {
22 DAOS_TF_RDONLY = (1 << 0),
32};
33
45d_rank_list_t *daos_rank_list_parse(const char *str, const char *sep);
46
47/*
48 * Transaction API
49 */
50
68int
69daos_tx_open(daos_handle_t coh, daos_handle_t *th, uint64_t flags,
70 daos_event_t *ev);
71
90int
92
108int
109daos_tx_open_snap(daos_handle_t coh, daos_epoch_t epoch, daos_handle_t *th,
110 daos_event_t *ev);
111
122int
124
134int
136
152int
154
169int
170daos_tx_hdl2epoch(daos_handle_t th, daos_epoch_t *epoch);
171
178static inline int
179daos_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
193static inline void
194daos_anchor_fini(__attribute__((unused)) daos_anchor_t *anchor)
195{
196 /* NOOP for now, might need to free memory */
197}
198
202static inline bool
203daos_anchor_is_eof(daos_anchor_t *anchor)
204{
205 return anchor->da_type == DAOS_ANCHOR_TYPE_EOF;
206}
207
217int
218daos_hlc2timespec(uint64_t hlc, struct timespec *ts);
219
230int
231daos_hlc2timestamp(uint64_t hlc, time_t *ts);
232
233#if defined(__cplusplus)
234}
235#endif
236#endif /* __DAOS_API_H__ */
@ DAOS_TF_ZERO_COPY
Definition daos_api.h:31
@ DAOS_TF_RDONLY
Definition daos_api.h:22
int daos_tx_hdl2epoch(daos_handle_t th, daos_epoch_t *epoch)
int daos_tx_abort(daos_handle_t th, daos_event_t *ev)
int daos_tx_commit(daos_handle_t th, daos_event_t *ev)
int daos_hlc2timespec(uint64_t hlc, struct timespec *ts)
int daos_tx_open(daos_handle_t coh, daos_handle_t *th, uint64_t flags, daos_event_t *ev)
int daos_hlc2timestamp(uint64_t hlc, time_t *ts)
d_rank_list_t * daos_rank_list_parse(const char *str, const char *sep)
int daos_tx_restart(daos_handle_t th, daos_event_t *ev)
int daos_tx_close(daos_handle_t th, daos_event_t *ev)
int daos_tx_open_snap(daos_handle_t coh, daos_epoch_t epoch, daos_handle_t *th, daos_event_t *ev)
uint16_t da_type
Definition daos_types.h:59