From mboxrd@z Thu Jan 1 00:00:00 1970 From: oscar.mateo@intel.com Subject: [PATCH v2 06/11] tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid) Date: Tue, 12 Nov 2013 11:50:40 +0000 Message-ID: <1384257045-15524-7-git-send-email-oscar.mateo@intel.com> References: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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) In-Reply-To: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 } -- 1.7.9.5