projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert poll exclusive
[lttng-modules.git]
/
ltt-debugfs-abi.c
diff --git
a/ltt-debugfs-abi.c
b/ltt-debugfs-abi.c
index e192474d5bac68664039c222a30f48d0dedb0959..e3f5b55df1219bb2f9ae76313d6532d0bb712f9e 100644
(file)
--- a/
ltt-debugfs-abi.c
+++ b/
ltt-debugfs-abi.c
@@
-32,6
+32,7
@@
#include <linux/slab.h>
#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "wrapper/ringbuffer/vfs.h"
#include <linux/slab.h>
#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "wrapper/ringbuffer/vfs.h"
+#include "wrapper/poll.h"
#include "ltt-debugfs-abi.h"
#include "ltt-events.h"
#include "ltt-tracer.h"
#include "ltt-debugfs-abi.h"
#include "ltt-events.h"
#include "ltt-tracer.h"
@@
-159,7
+160,11
@@
long lttng_abi_add_context(struct file *file,
case LTTNG_KERNEL_CONTEXT_NICE:
return lttng_add_nice_to_ctx(ctx);
case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
case LTTNG_KERNEL_CONTEXT_NICE:
return lttng_add_nice_to_ctx(ctx);
case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
- return -ENOSYS;
+ context_param.u.perf_counter.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ return lttng_add_perf_counter_to_ctx(context_param.u.perf_counter.type,
+ context_param.u.perf_counter.config,
+ context_param.u.perf_counter.name,
+ ctx);
case LTTNG_KERNEL_CONTEXT_COMM:
return lttng_add_comm_to_ctx(ctx);
default:
case LTTNG_KERNEL_CONTEXT_COMM:
return lttng_add_comm_to_ctx(ctx);
default:
@@
-547,8
+552,6
@@
long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg
}
}
}
}
-/* TODO: poll */
-#if 0
/**
* lttng_channel_poll - lttng stream addition/removal monitoring
*
/**
* lttng_channel_poll - lttng stream addition/removal monitoring
*
@@
-562,10
+565,12
@@
unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
if (file->f_mode & FMODE_READ) {
poll_wait_set_exclusive(wait);
if (file->f_mode & FMODE_READ) {
poll_wait_set_exclusive(wait);
- poll_wait(file, &channel->notify_wait, wait);
+ poll_wait(file, channel->ops->get_hp_wait_queue(channel->chan),
+ wait);
- /* TODO: identify when the channel is being finalized. */
- if (finalized)
+ if (channel->ops->is_disabled(channel->chan))
+ return POLLERR;
+ if (channel->ops->is_finalized(channel->chan))
return POLLHUP;
else
return POLLIN | POLLRDNORM;
return POLLHUP;
else
return POLLIN | POLLRDNORM;
@@
-573,7
+578,6
@@
unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
return mask;
}
return mask;
}
-#endif //0
static
int lttng_channel_release(struct inode *inode, struct file *file)
static
int lttng_channel_release(struct inode *inode, struct file *file)
@@
-587,10
+591,7
@@
int lttng_channel_release(struct inode *inode, struct file *file)
static const struct file_operations lttng_channel_fops = {
.release = lttng_channel_release,
static const struct file_operations lttng_channel_fops = {
.release = lttng_channel_release,
-/* TODO */
-#if 0
.poll = lttng_channel_poll,
.poll = lttng_channel_poll,
-#endif //0
.unlocked_ioctl = lttng_channel_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = lttng_channel_ioctl,
.unlocked_ioctl = lttng_channel_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = lttng_channel_ioctl,
This page took
0.023817 seconds
and
4
git commands to generate.