From 39055880da33b32fe3a60097cfa0d27b58560250 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 13 Jul 2009 07:40:48 -0700 Subject: [PATCH] pipe - fix UP build error. Reported-by: Hasso Tepper --- sys/kern/sys_pipe.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 21ee2c0..c98825b 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -789,20 +789,22 @@ pipe_write(struct file *fp, struct uio *uio, struct ucred *cred, int fflags) if (segsize > space) segsize = space; +#ifdef SMP /* * If this is the first loop and the reader is * blocked, do a preemptive wakeup of the reader. * - * This works for both SMP and UP. On SMP the IPI - * latency plus the wlock interlock on the reader - * side is the fastest way to get the reader going. - * (The scheduler will hard loop on lock tokens). + * On SMP the IPI latency plus the wlock interlock + * on the reader side is the fastest way to get the + * reader going. (The scheduler will hard loop on + * lock tokens). * * NOTE: We can't clear WANTR here without acquiring * the rlock, which we don't want to do here! */ if ((wpipe->pipe_state & PIPE_WANTR) && pipe_mpsafe > 1) wakeup(wpipe); +#endif /* * Transfer segment, which may include a wrap-around. -- 1.7.7.2