projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove lttng-ftrace integration
[lttng-modules.git]
/
wrapper
/
kref.h
diff --git
a/wrapper/kref.h
b/wrapper/kref.h
index f30a9aed515db306a1803ff5e4bcc2612a75801b..3f3be7a42d27c0445d7273fc771b5d55dd120248 100644
(file)
--- a/
wrapper/kref.h
+++ b/
wrapper/kref.h
@@
-28,15
+28,24
@@
#include <linux/kref.h>
#include <linux/rculist.h>
#include <linux/kref.h>
#include <linux/rculist.h>
+#include <linux/version.h>
/*
* lttng_kref_get: get reference count, checking for overflow.
*
* Return 1 if reference is taken, 0 otherwise (overflow).
*/
/*
* lttng_kref_get: get reference count, checking for overflow.
*
* Return 1 if reference is taken, 0 otherwise (overflow).
*/
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+static inline int lttng_kref_get(struct kref *kref)
+{
+ kref_get(kref);
+ return 1;
+}
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
static inline int lttng_kref_get(struct kref *kref)
{
return atomic_add_unless(&kref->refcount, 1, INT_MAX);
}
static inline int lttng_kref_get(struct kref *kref)
{
return atomic_add_unless(&kref->refcount, 1, INT_MAX);
}
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
#endif /* _LTTNG_WRAPPER_KREF_H */
#endif /* _LTTNG_WRAPPER_KREF_H */
This page took
0.036087 seconds
and
4
git commands to generate.