bin: compile lttng-sessiond as C++
[lttng-tools.git] / src / common / readwrite.h
CommitLineData
33b14136
MD
1#ifndef LTTNG_COMMON_READWRITE_H
2#define LTTNG_COMMON_READWRITE_H
3
4/*
ab5be9fa 5 * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
33b14136 6 *
ab5be9fa 7 * SPDX-License-Identifier: LGPL-2.1-only
33b14136 8 *
33b14136
MD
9 */
10
11#include <unistd.h>
73ec1cf9 12#include <common/macros.h>
33b14136 13
7966af57
SM
14#ifdef __cplusplus
15extern "C" {
16#endif
17
33b14136
MD
18/*
19 * lttng_read and lttng_write take care of EINTR and partial read/write.
20 * Upon success, they return the "count" received as parameter.
21 * They can return a negative value if an error occurs.
22 * If a value lower than the requested "count" is returned, it means an
83f4233d 23 * error occurred.
33b14136
MD
24 * The error can be checked by querying errno.
25 */
26ssize_t lttng_read(int fd, void *buf, size_t count);
27ssize_t lttng_write(int fd, const void *buf, size_t count);
28
7966af57
SM
29#ifdef __cplusplus
30}
31#endif
32
33b14136 33#endif /* LTTNG_COMMON_READWRITE_H */
This page took 0.049415 seconds and 4 git commands to generate.