X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ffd-tracker%2Ffd-tracker.c;h=772bf04bc5994efa5fc351a2ed933514506de36c;hp=033ae40f8516f6389e1d0b46db1ad01b8bc6ea20;hb=ea05fafd4088958df7f994fcf903627bc609808d;hpb=f6bef9660a264ebeb2a00e80bf48bec41fb47c1a diff --git a/src/common/fd-tracker/fd-tracker.c b/src/common/fd-tracker/fd-tracker.c index 033ae40f8..772bf04bc 100644 --- a/src/common/fd-tracker/fd-tracker.c +++ b/src/common/fd-tracker/fd-tracker.c @@ -360,6 +360,7 @@ end: return ret; } +LTTNG_HIDDEN struct fd_tracker *fd_tracker_create(const char *unlinked_file_path, unsigned int capacity) { @@ -405,6 +406,7 @@ error: return NULL; } +LTTNG_HIDDEN void fd_tracker_log(struct fd_tracker *tracker) { struct fs_handle_tracked *handle; @@ -453,6 +455,7 @@ void fd_tracker_log(struct fd_tracker *tracker) pthread_mutex_unlock(&tracker->lock); } +LTTNG_HIDDEN int fd_tracker_destroy(struct fd_tracker *tracker) { int ret = 0; @@ -488,6 +491,7 @@ end: return ret; } +LTTNG_HIDDEN struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker, struct lttng_directory_handle *directory, const char *path, @@ -605,6 +609,7 @@ static int fd_tracker_suspend_handles( return left_to_close ? -EMFILE : 0; } +LTTNG_HIDDEN int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker, int *out_fds, const char **names, @@ -637,7 +642,7 @@ int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker, } else { /* * There are not enough active suspendable file - * descriptors to open a new fd and still accomodate the + * descriptors to open a new fd and still accommodates the * tracker's capacity. */ WARN("Cannot open unsuspendable fd, too many unsuspendable file descriptors are opened (%u)", @@ -702,6 +707,7 @@ end_free_entries: goto end_unlock; } +LTTNG_HIDDEN int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker, int *fds_in, unsigned int fd_count, @@ -928,7 +934,7 @@ static int fs_handle_tracked_close(struct fs_handle *_handle) * isn't much the user can do about it. */ if (close(handle->fd)) { - PERROR("Failed to close the file descritptor (%d) of fs handle to %s, close() returned", + PERROR("Failed to close the file descriptor (%d) of fs handle to %s, close() returned", handle->fd, path ? path : "Unknown"); } handle->fd = -1;