From owner-freebsd-multimedia@FreeBSD.ORG Thu May 22 11:05:41 2014 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A06F59C3; Thu, 22 May 2014 11:05:41 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61B232543; Thu, 22 May 2014 11:05:40 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B6B491FE026; Thu, 22 May 2014 13:05:38 +0200 (CEST) Message-ID: <537DDA2E.6030609@selasky.org> Date: Thu, 22 May 2014 13:06:22 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: freebsd-multimedia@FreeBSD.org, FreeBSD Current Subject: Patch for Linux Futexes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 11:05:41 -0000 Hi, When using the Linux Skype client under FreeBSD I sometimes see that the Audio disappears in the one direction. When I check "ps auxw" I see skype is stuck on a so-called Futex. I looked into the Linux futex code and see that wakeup_one() is used instead of wakeup(). Maybe others can test too and verify if replacing wakeup_one() by wakeup() makes any difference in for Linux applications using Futexes. --HPS > diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c > index 9b4c92f..e893bf4 100644 > --- a/sys/compat/linux/linux_futex.c > +++ b/sys/compat/linux/linux_futex.c > @@ -498,7 +498,7 @@ futex_wake(struct futex *f, int n, uint32_t bitset) > wp->wp_flags |= FUTEX_WP_REMOVED; > TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list); > LIN_SDT_PROBE1(futex, futex_wake, wakeup, wp); > - wakeup_one(wp); > + wakeup(wp); > if (++count == n) > break; > } > @@ -525,7 +525,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) > wp->wp_flags |= FUTEX_WP_REMOVED; > TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list); > LIN_SDT_PROBE1(futex, futex_requeue, wakeup, wp); > - wakeup_one(wp); > + wakeup(wp); > } else { > LIN_SDT_PROBE3(futex, futex_requeue, requeue, > f->f_uaddr, wp, f2->f_uaddr);