From patchwork Tue Nov 12 11:50:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: oscar.mateo@intel.com X-Patchwork-Id: 3171611 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B13729F39E for ; Tue, 12 Nov 2013 10:54:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D4DA2037F for ; Tue, 12 Nov 2013 10:54:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9D42920216 for ; Tue, 12 Nov 2013 10:54:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17847FA937; Tue, 12 Nov 2013 02:54:27 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id BF4C7FA934 for ; Tue, 12 Nov 2013 02:54:14 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Nov 2013 02:54:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,535,1378882800"; d="scan'208";a="433802935" Received: from omateolo-linux2.isw.intel.com ([10.102.226.43]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2013 02:54:13 -0800 From: oscar.mateo@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Nov 2013 11:50:40 +0000 Message-Id: <1384257045-15524-7-git-send-email-oscar.mateo@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> References: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> Subject: [Intel-gfx] [PATCH v2 06/11] tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org 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 From: Oscar Mateo Signed-off-by: Oscar Mateo --- tests/drm_get_client_auth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/drm_get_client_auth.c b/tests/drm_get_client_auth.c index 28e1b3d..2f493f9 100644 --- a/tests/drm_get_client_auth.c +++ b/tests/drm_get_client_auth.c @@ -47,9 +47,13 @@ static bool is_local_tid(pid_t tid) { - /* On Linux systems, drmGetClient() would return the thread ID - instead of the actual process ID */ - return syscall(SYS_gettid) == tid; +#ifndef ANDROID + /* On Linux systems, drmGetClient() would return the thread ID + instead of the actual process ID */ + return syscall(SYS_gettid) == tid; +#else + return gettid() == tid; +#endif }