pthread_mutex_lock(&handle->lock);
lttng_inode_borrow_location(
handle->inode, &node_directory_handle, &path);
- assert(handle->fd >= 0);
+ LTTNG_ASSERT(handle->fd >= 0);
if (handle->in_use) {
/* This handle can't be suspended as it is currently in use. */
ret = -EAGAIN;
lttng_inode_borrow_location(
handle->inode, &node_directory_handle, &path);
- assert(handle->fd == -1);
- assert(path);
+ LTTNG_ASSERT(handle->fd == -1);
+ LTTNG_ASSERT(path);
ret = open_from_properties(
node_directory_handle, path, &handle->properties);
if (ret < 0) {
if (tracker->unsuspendable_fds) {
ret = cds_lfht_destroy(tracker->unsuspendable_fds, NULL);
- assert(!ret);
+ LTTNG_ASSERT(!ret);
}
lttng_inode_registry_destroy(tracker->inode_registry);
} 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)",
*/
pthread_mutex_lock(&handle->tracker->lock);
pthread_mutex_lock(&handle->lock);
- assert(!handle->in_use);
+ LTTNG_ASSERT(!handle->in_use);
handle->tracker->stats.uses++;
if (handle->fd >= 0) {
* 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;