From patchwork Tue Jan 15 12:34:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 1977351 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 56B64DF264 for ; Tue, 15 Jan 2013 12:37:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 486D8E66CB for ; Tue, 15 Jan 2013 04:37:40 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 658E3E660B for ; Tue, 15 Jan 2013 04:34:27 -0800 (PST) Received: by mail-wg0-f42.google.com with SMTP id dr1so1834799wgb.3 for ; Tue, 15 Jan 2013 04:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=4WPO9BxKFy+ZUQfdEV8RN1rN/+pBFAMfQiz5xbKMShg=; b=Ta+9HwBi+wDEJdF+D72gf0/GJpLMS6GkRLOif6bbw+Ja7N0uuwY+HborM6y3zRIzXn WnfEqRT6AyK5xlofrMlC3D7J3inU4TnxcTnNGNqinJcDLSVzUcUXjESXHj/S6AlMY3qC floRrI3SGlMCho2NtvKlnvUIQSo/kIbLxhx9/RTFEt5jOwoZnvY6o5cOvaqmPcsNqB+p w4CFdTvpV6CkZGBuMAGt6do/g0NgLwgVj7Fp6YjusoKbj095AJfrsDZ41EPqVs835DNL q1q0yKUyv53Q1qi8pjNJiPi0o65gU1TKSpIPdFC2qWcfTgnNePhvi0QF41dHmHNkJTxX KpvQ== X-Received: by 10.180.97.68 with SMTP id dy4mr3452700wib.7.1358253266500; Tue, 15 Jan 2013 04:34:26 -0800 (PST) Received: from localhost (5ED48CEF.cm-7-5c.dynamic.ziggo.nl. [94.212.140.239]) by mx.google.com with ESMTPS id g2sm3615386wiy.0.2013.01.15.04.34.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Jan 2013 04:34:25 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Tue, 15 Jan 2013 13:34:23 +0100 From: Maarten Lankhorst To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH 3/7] sched: allow try_to_wake_up to be used internally outside of core.c Date: Tue, 15 Jan 2013 13:34:00 +0100 Message-Id: <1358253244-11453-4-git-send-email-maarten.lankhorst@canonical.com> X-Mailer: git-send-email 1.8.0.3 In-Reply-To: <1358253244-11453-1-git-send-email-maarten.lankhorst@canonical.com> References: <1358253244-11453-1-git-send-email-maarten.lankhorst@canonical.com> 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: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Not exported, since only used by the fence implementation. 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 7cb64d4..7aaba95 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -11,6 +11,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 257002c..5f23fe3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1425,7 +1425,7 @@ static void ttwu_queue(struct task_struct *p, int cpu) * Returns %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;