Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dc8f095 authored by Steven Rostedt's avatar Steven Rostedt Committed by Thomas Gleixner
Browse files

ftrace: trace_pipe implement NONBLOCK



This patch implements "NONBLOCK" for trace_pipe. If the trace_pipe is opened
with O_NONBLOCK, then the trace_pipe read will not block when buffer is empty.

Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 84527997
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2233,6 +2233,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
	start = 0;

	while (trace_empty(iter)) {

		if ((filp->f_flags & O_NONBLOCK))
			return -EAGAIN;

		/*
		 * This is a make-shift waitqueue. The reason we don't use
		 * an actual wait queue is because: