From patchwork Thu Mar 10 14:27:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 8557461 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 33272C0553 for ; Thu, 10 Mar 2016 14:27:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6804820379 for ; Thu, 10 Mar 2016 14:27:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8A5A720377 for ; Thu, 10 Mar 2016 14:27:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1CB46E97D; Thu, 10 Mar 2016 14:27:16 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id CA8FE6E97D for ; Thu, 10 Mar 2016 14:27:14 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 10 Mar 2016 06:27:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,316,1455004800"; d="scan'208";a="920970444" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by fmsmga001.fm.intel.com with ESMTP; 10 Mar 2016 06:27:13 -0800 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Thu, 10 Mar 2016 14:27:05 +0000 Message-Id: <1457620025-36438-1-git-send-email-derek.j.morton@intel.com> X-Mailer: git-send-email 1.9.1 Cc: chris@chris.wilson.co.uk Subject: [Intel-gfx] [PATCH i-g-t] benchmarks/gem_syslatency: Add extra android guard to attr_setaffinity_np X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 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 Android defines __USE_GNU but does not provide pthread_attr_setaffinity_np() so added an extra guard arround pthread_attr_setaffinity_np(). Signed-off-by: Derek Morton --- benchmarks/gem_syslatency.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c index f09050c..6cad3a0 100644 --- a/benchmarks/gem_syslatency.c +++ b/benchmarks/gem_syslatency.c @@ -189,6 +189,7 @@ static void *sys_wait(void *arg) static void bind_cpu(pthread_attr_t *attr, int cpu) { #ifdef __USE_GNU +#ifndef ANDROID cpu_set_t mask; if (cpu == -1) @@ -199,6 +200,7 @@ static void bind_cpu(pthread_attr_t *attr, int cpu) pthread_attr_setaffinity_np(attr, sizeof(mask), &mask); #endif +#endif } static void rtprio(pthread_attr_t *attr, int prio)