projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: run format-cpp on the tree
[lttng-tools.git]
/
src
/
common
/
fd-tracker
/
fd-tracker.hpp
diff --git
a/src/common/fd-tracker/fd-tracker.hpp
b/src/common/fd-tracker/fd-tracker.hpp
index a38c880bdfebdfc0e2cd9e6f28af8cf2601e19e2..06e9b1d1499b306b3bf32c451d7ecdd31651f9a3 100644
(file)
--- a/
src/common/fd-tracker/fd-tracker.hpp
+++ b/
src/common/fd-tracker/fd-tracker.hpp
@@
-10,6
+10,7
@@
#include <common/compat/directory-handle.hpp>
#include <common/macros.hpp>
#include <common/compat/directory-handle.hpp>
#include <common/macros.hpp>
+
#include <stdint.h>
#include <sys/types.h>
#include <stdint.h>
#include <sys/types.h>
@@
-26,7
+27,7
@@
struct fd_tracker;
*
* Must return zero on success. Negative values should map to a UNIX error code.
*/
*
* Must return zero on success. Negative values should map to a UNIX error code.
*/
-
typedef int (*fd_open_cb)(void *, int *out_fds
);
+
using fd_open_cb = int (*)(void *, int *
);
/*
* Callback to allow the user to close a now-untracked file descriptor. This
/*
* Callback to allow the user to close a now-untracked file descriptor. This
@@
-38,7
+39,7
@@
typedef int (*fd_open_cb)(void *, int *out_fds);
*
* Must return zero on success. Negative values should map to a UNIX error code.
*/
*
* Must return zero on success. Negative values should map to a UNIX error code.
*/
-
typedef int (*fd_close_cb)(void *, int *in_fds
);
+
using fd_close_cb = int (*)(void *, int *
);
/*
* Set the maximal number of fds that the process should be allowed to open at
/*
* Set the maximal number of fds that the process should be allowed to open at
@@
-49,8
+50,7
@@
typedef int (*fd_close_cb)(void *, int *in_fds);
* under which unlinked files will be stored for as long as a reference to them
* is held.
*/
* under which unlinked files will be stored for as long as a reference to them
* is held.
*/
-struct fd_tracker *fd_tracker_create(const char *unlinked_file_path,
- unsigned int capacity);
+struct fd_tracker *fd_tracker_create(const char *unlinked_file_path, unsigned int capacity);
/* Returns an error if file descriptors are leaked. */
int fd_tracker_destroy(struct fd_tracker *tracker);
/* Returns an error if file descriptors are leaked. */
int fd_tracker_destroy(struct fd_tracker *tracker);
@@
-78,10
+78,10
@@
int fd_tracker_destroy(struct fd_tracker *tracker);
* open.
*/
struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
* open.
*/
struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
- struct lttng_directory_handle *directory,
- const char *path,
- int flags,
- mode_t *mode);
+
struct lttng_directory_handle *directory,
+
const char *path,
+
int flags,
+
mode_t *mode);
/*
* Open a tracked unsuspendable file descriptor.
/*
* Open a tracked unsuspendable file descriptor.
@@
-106,11
+106,11
@@
struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
* accommodates the request for a new unsuspendable entry.
*/
int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker,
* accommodates the request for a new unsuspendable entry.
*/
int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker,
- int *out_fds,
- const char **names,
- unsigned int fd_count,
- fd_open_cb open,
- void *data);
+
int *out_fds,
+
const char **names,
+
unsigned int fd_count,
+
fd_open_cb open,
+
void *data);
/*
* Close a tracked unsuspendable file descriptor.
/*
* Close a tracked unsuspendable file descriptor.
@@
-127,11
+127,8
@@
int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker,
* Closed fds are set to -1 in the fds array which, in the event of an error,
* allows the user to know which file descriptors are no longer being tracked.
*/
* Closed fds are set to -1 in the fds array which, in the event of an error,
* allows the user to know which file descriptors are no longer being tracked.
*/
-int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker,
- int *fds,
- unsigned int fd_count,
- fd_close_cb close,
- void *data);
+int fd_tracker_close_unsuspendable_fd(
+ struct fd_tracker *tracker, int *fds, unsigned int fd_count, fd_close_cb close, void *data);
/*
* Log the contents of the fd_tracker.
/*
* Log the contents of the fd_tracker.
This page took
0.029183 seconds
and
4
git commands to generate.