From patchwork Wed May 30 06:47:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kejun ZHOU X-Patchwork-Id: 9041 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 578C223DEB for ; Wed, 30 May 2012 06:48:09 +0000 (UTC) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by fiordland.canonical.com (Postfix) with ESMTP id 21F76A185CE for ; Wed, 30 May 2012 06:48:09 +0000 (UTC) Received: by ghbf1 with SMTP id f1so2961067ghb.37 for ; Tue, 29 May 2012 23:48:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=e/WHKMHA9OSBp/7V6KmMpS7kY52GXX4oM72Y/Fc9tI4=; b=fQtKL7qR8BG0M9JiJeJrkjnk+ZpUAUQJwupp4qTLGhRo92TqlQS16fvBWb+EMKCCrH 2dYjXFOIWndkA2nbUCnc01jyq4iGCZM7cMX9xOEtTOw/+BRrWt40lwmGTwFanWV9PPc6 dcWaXRYzUSwTjJYbM7rHiIZdkliHEa/fQbuUjQh5sTV05CAI3xMBDfkhMQCmLKxGxwsw otWN7wOOJ6tJfqDingGoBTmevKigYmmABurMrn6a8EJMoy8tWrJ8yfGMOklfCCRixuyR cANQNFy5ZgmAOytJEAXptz4sRNt7XfToby+h5cgrj5FDBG7pFL2c1kCcEhc552cz3H31 8gbA== Received: by 10.50.40.193 with SMTP id z1mr9708406igk.0.1338360488308; Tue, 29 May 2012 23:48:08 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp174161ibb; Tue, 29 May 2012 23:48:07 -0700 (PDT) Received: by 10.68.241.228 with SMTP id wl4mr46175802pbc.51.1338360486603; Tue, 29 May 2012 23:48:06 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id hv8si23920194pbc.93.2012.05.29.23.48.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 23:48:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of kejun.zhou@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of kejun.zhou@linaro.org) smtp.mail=kejun.zhou@linaro.org Received: by danh15 with SMTP id h15so7409863dan.37 for ; Tue, 29 May 2012 23:48:06 -0700 (PDT) Received: by 10.68.204.227 with SMTP id lb3mr47262651pbc.92.1338360486078; Tue, 29 May 2012 23:48:06 -0700 (PDT) Received: from localhost.localdomain ([118.143.64.134]) by mx.google.com with ESMTPS id qc1sm20821739pbb.62.2012.05.29.23.48.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 23:48:05 -0700 (PDT) From: "kejun.zhou" To: hongbo.zhang@linaro.org Cc: patches@linaro.org, linaro-dev@lists.linaro.org, "kejun.zhou" Subject: [PATCH 1/2] Porting to Android system Date: Wed, 30 May 2012 14:47:11 +0800 Message-Id: <1338360432-13377-1-git-send-email-kejun.zhou@linaro.org> X-Mailer: git-send-email 1.7.0.4 X-Gm-Message-State: ALoCoQk1SueJiKnsHaBLuywWXML3HYK90YoBvDVS466RXNnrG6rJZ3XUxR5ntTH+hDe18DRtXD8t From: kejun.zhou Signed-off-by: kejun.zhou --- cpuidle/cpuidle_killer.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c index 67a675e..c8910f4 100644 --- a/cpuidle/cpuidle_killer.c +++ b/cpuidle/cpuidle_killer.c @@ -2,7 +2,17 @@ #include #include #include +#ifndef ANDROID #include +#else +// As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface +// However, the kernel does... +#include // for struct timex +#include // for __NR_adjtimex +static int adjtimex(struct timex *buf) { + return syscall(__NR_adjtimex, buf); +} +#endif #include #include #include