projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run clang-format on the whole tree
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
fd-limit.cpp
diff --git
a/src/bin/lttng-sessiond/fd-limit.cpp
b/src/bin/lttng-sessiond/fd-limit.cpp
index ac5c83f4b19775beed137606c483d20dadb3ecd9..361b5c6b58bdda0b856154c4ff2bb59dd8dc76e7 100644
(file)
--- a/
src/bin/lttng-sessiond/fd-limit.cpp
+++ b/
src/bin/lttng-sessiond/fd-limit.cpp
@@
-6,13
+6,15
@@
*/
#define _LGPL_SOURCE
*/
#define _LGPL_SOURCE
-#include <urcu/uatomic.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <stdio.h>
#include "fd-limit.hpp"
#include "fd-limit.hpp"
-#include <common/error.hpp>
+
#include <common/compat/errno.hpp>
#include <common/compat/errno.hpp>
+#include <common/error.hpp>
+
+#include <stdio.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+#include <urcu/uatomic.h>
/* total count of fd. */
static long fd_count;
/* total count of fd. */
static long fd_count;
@@
-35,16
+37,14
@@
int lttng_fd_get(enum lttng_fd_type type, unsigned int nr)
}
newval = uatomic_add_return(&fd_count, (long) nr);
}
newval = uatomic_add_return(&fd_count, (long) nr);
- if ((long) (newval * 100)
- - (long) (max_nr_fd * fd_threshold[type]) > 0) {
+ if ((long) (newval * 100) - (long) (max_nr_fd * fd_threshold[type]) > 0) {
uatomic_sub(&fd_count, (long) nr);
return -EPERM;
}
return 0;
}
uatomic_sub(&fd_count, (long) nr);
return -EPERM;
}
return 0;
}
-void lttng_fd_put(enum lttng_fd_type type __attribute__((unused)),
- unsigned int nr)
+void lttng_fd_put(enum lttng_fd_type type __attribute__((unused)), unsigned int nr)
{
uatomic_sub(&fd_count, (long) nr);
}
{
uatomic_sub(&fd_count, (long) nr);
}
This page took
0.022927 seconds
and
4
git commands to generate.