Cleanup: misleading comment about deferrable timer
[lttng-modules.git] / lib / ringbuffer / ring_buffer_iterator.c
index dbfe1f79d644ecb7b4dd6e2a3a1bad4dd3352d37..c6e5225669de3c044422f8451575fe6004ff655a 100644 (file)
@@ -1,19 +1,32 @@
 /*
  * ring_buffer_iterator.c
  *
- * (C) Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * Ring buffer and channel iterators. Get each event of a channel in order. Uses
  * a prio heap for per-cpu buffers, giving a O(log(NR_CPUS)) algorithmic
  * complexity for the "get next event" operation.
  *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
  * Author:
  *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include "../../wrapper/ringbuffer/iterator.h"
+#include "../../wrapper/file.h"
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/module.h>
@@ -58,7 +71,7 @@ restart:
                         * Per-CPU buffers rather use a "push" scheme because
                         * the IPI needed to flush all CPU's buffers is too
                         * costly. In the "push" scheme, the reader waits for
-                        * the writer periodic deferrable timer to flush the
+                        * the writer periodic timer to flush the
                         * buffers (keeping track of a quiescent state
                         * timestamp). Therefore, the writer "pushes" data out
                         * of the buffers rather than letting the reader "pull"
@@ -339,7 +352,7 @@ void lib_ring_buffer_iterator_init(struct channel *chan, struct lib_ring_buffer
 
 #ifdef CONFIG_HOTPLUG_CPU
 static
-int __cpuinit channel_iterator_cpu_hotplug(struct notifier_block *nb,
+int channel_iterator_cpu_hotplug(struct notifier_block *nb,
                                           unsigned long action,
                                           void *hcpu)
 {
@@ -679,7 +692,7 @@ ssize_t lib_ring_buffer_file_read(struct file *filp,
                                  size_t count,
                                  loff_t *ppos)
 {
-       struct inode *inode = filp->f_dentry->d_inode;
+       struct inode *inode = filp->lttng_f_dentry->d_inode;
        struct lib_ring_buffer *buf = inode->i_private;
        struct channel *chan = buf->backend.chan;
 
@@ -704,7 +717,7 @@ ssize_t channel_file_read(struct file *filp,
                          size_t count,
                          loff_t *ppos)
 {
-       struct inode *inode = filp->f_dentry->d_inode;
+       struct inode *inode = filp->lttng_f_dentry->d_inode;
        struct channel *chan = inode->i_private;
        const struct lib_ring_buffer_config *config = &chan->backend.config;
 
@@ -784,7 +797,7 @@ const struct file_operations channel_payload_file_operations = {
        .open = channel_file_open,
        .release = channel_file_release,
        .read = channel_file_read,
-       .llseek = lib_ring_buffer_no_llseek,
+       .llseek = vfs_lib_ring_buffer_no_llseek,
 };
 EXPORT_SYMBOL_GPL(channel_payload_file_operations);
 
@@ -793,6 +806,6 @@ const struct file_operations lib_ring_buffer_payload_file_operations = {
        .open = lib_ring_buffer_file_open,
        .release = lib_ring_buffer_file_release,
        .read = lib_ring_buffer_file_read,
-       .llseek = lib_ring_buffer_no_llseek,
+       .llseek = vfs_lib_ring_buffer_no_llseek,
 };
 EXPORT_SYMBOL_GPL(lib_ring_buffer_payload_file_operations);
This page took 0.024954 seconds and 4 git commands to generate.