From patchwork Mon Jan 13 12:31:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 3475041 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65F87C02DC for ; Mon, 13 Jan 2014 13:01:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 633EF200EC for ; Mon, 13 Jan 2014 13:01:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F3F09200F2 for ; Mon, 13 Jan 2014 13:01:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D428D10F0DD; Mon, 13 Jan 2014 05:01:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by gabe.freedesktop.org (Postfix) with ESMTP id 4350910F0DD for ; Mon, 13 Jan 2014 05:01:13 -0800 (PST) Received: from lillypilly.canonical.com ([91.189.89.62]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1W2gg4-0004we-NM; Mon, 13 Jan 2014 12:31:36 +0000 Received: by lillypilly.canonical.com (Postfix, from userid 3489) id ACC5C26C291F; Mon, 13 Jan 2014 12:31:36 +0000 (UTC) Subject: [PATCH 1/7] sched: allow try_to_wake_up to be used internally outside of core.c To: linux-kernel@vger.kernel.org From: Maarten Lankhorst Date: Mon, 13 Jan 2014 13:31:31 +0100 Message-ID: <20140113123126.20574.74329.stgit@patser> In-Reply-To: <20140113122818.20574.34710.stgit@patser> References: <20140113122818.20574.34710.stgit@patser> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: linux-arch@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, ccross@google.com, linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel fence implementation doesn't use event queues, but needs to perform the same wake up. The symbol is not exported, since the fence implementation is not built as a module. Signed-off-by: Maarten Lankhorst --- include/linux/wait.h | 1 + kernel/sched/core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index eaa00b10abaa..c54e3ef50134 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -12,6 +12,7 @@ typedef struct __wait_queue wait_queue_t; typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key); +int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags); struct __wait_queue { unsigned int flags; diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a88f4a485c5e..f41d317042dd 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1578,7 +1578,7 @@ static void ttwu_queue(struct task_struct *p, int cpu) * Return: %true if @p was woken up, %false if it was already running. * or @state didn't match @p's state. */ -static int +int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) { unsigned long flags;