Detect missing symbols used with kallsyms_lookup at compile time
[lttng-modules.git] / src / lttng-context-prio.c
index d300445546d443443f103a3f8607b96a3e6895ad..2a16ea87ce83f038c9c8f115b788a4f413c5754d 100644 (file)
@@ -29,6 +29,19 @@ int wrapper_task_prio_init(void)
        return 0;
 }
 
+/*
+ * Canary function to check for 'task_prio()' at compile time.
+ *
+ * From 'include/linux/sched.h':
+ *
+ *   extern int task_prio(const struct task_struct *p);
+ */
+__attribute__((unused)) static
+int __canary__task_prio(const struct task_struct *p)
+{
+       return task_prio(p);
+}
+
 static
 size_t prio_get_size(size_t offset)
 {
This page took 0.026078 seconds and 4 git commands to generate.