From patchwork Sun Feb 1 00:16:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 44108 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 445C02359E for ; Sun, 1 Feb 2015 00:17:31 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf9135645wiv.0 for ; Sat, 31 Jan 2015 16:17:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=gPFCmgK4YzBK3OLy9H3Yh9oOBGihU9SEDiWrwDOX1NI=; b=KOaufVgHWyARu2PjBHDaShFiHFaQt8g9XKUcLKaimcT4/NsVyVzUPH9Krhuezg4h1d 4xe+8rFW3Wn9Lp46F0uWImobH28zOdVRbDqNbwmf4Pha8CwSGmh+pr1nBqbhVmJFgj3M Cm9lh/lMuZgjJGtiJu3ZL6phoaCrOml7HgI4LY3kKUVeLeMEtNTlsmQerRkeopDV4f9p /Eid+zbCfDoIfPNsLCrMx+FDCaINitiWp524rNob+Nk1ztuCDnIrp1qZJLjdlTPQ5jX1 zMtFngoxC7v+3lEcAqEhxA58sNo4oli/qrLbzgnbiztNN+4fEyTy+M0cSZJvu9CydFsN DE3Q== X-Gm-Message-State: ALoCoQkNd2BXdD6xAsMTHwVx5v8yYijkPRwff+O4gz8/k2/sr+CbsO4i6vV1xh+kSBZSZRKbWbht X-Received: by 10.180.93.165 with SMTP id cv5mr399417wib.6.1422749850593; Sat, 31 Jan 2015 16:17:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.9 with SMTP id r9ls549735lae.31.gmail; Sat, 31 Jan 2015 16:17:30 -0800 (PST) X-Received: by 10.152.5.72 with SMTP id q8mr12561929laq.57.1422749850441; Sat, 31 Jan 2015 16:17:30 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id we6si13449609lbb.1.2015.01.31.16.17.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 31 Jan 2015 16:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id s18so31319626lam.3 for ; Sat, 31 Jan 2015 16:17:29 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr12681901lbc.56.1422749849673; Sat, 31 Jan 2015 16:17:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp507695lbj; Sat, 31 Jan 2015 16:17:29 -0800 (PST) X-Received: by 10.229.37.136 with SMTP id x8mr27579147qcd.30.1422749848400; Sat, 31 Jan 2015 16:17:28 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id q6si19813672qac.112.2015.01.31.16.17.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 31 Jan 2015 16:17:28 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YHiE9-0002Ky-Mc; Sun, 01 Feb 2015 00:17:25 +0000 Received: from mail-oi0-f48.google.com ([209.85.218.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YHiDp-0002IN-Ci for lng-odp@lists.linaro.org; Sun, 01 Feb 2015 00:17:05 +0000 Received: by mail-oi0-f48.google.com with SMTP id v63so39759079oia.7 for ; Sat, 31 Jan 2015 16:17:00 -0800 (PST) X-Received: by 10.182.219.200 with SMTP id pq8mr97327obc.61.1422749820150; Sat, 31 Jan 2015 16:17:00 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id xr17sm5945905oeb.12.2015.01.31.16.16.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Jan 2015 16:16:59 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 31 Jan 2015 18:16:36 -0600 Message-Id: <1422749807-20228-6-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422749807-20228-1-git-send-email-bill.fischofer@linaro.org> References: <1422749807-20228-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv3 4/9] linux-generic: events: add strong typing support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer --- include/odp/api/event.h | 12 ++++++++++++ platform/linux-generic/include/odp/plat/event_types.h | 14 ++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/include/odp/api/event.h b/include/odp/api/event.h index 50c031a..6b60b83 100644 --- a/include/odp/api/event.h +++ b/include/odp/api/event.h @@ -69,6 +69,18 @@ extern "C" { */ int odp_event_type(odp_event_t event); +/** + * Get printable value for an odp_event_t + * + * @param hdl odp_event_t handle to be printed + * @return uint64_t value that can be used to print/display this + * handle + * + * @note This routine is intended to be used for diagnostic purposes + * to enable applications to generate a printable value that represents + * an odp_event_t handle. + */ +uint64_t odp_event_t_print(odp_event_t hdl); /** * @} diff --git a/platform/linux-generic/include/odp/plat/event_types.h b/platform/linux-generic/include/odp/plat/event_types.h index 4a0756b..84d8e08 100644 --- a/platform/linux-generic/include/odp/plat/event_types.h +++ b/platform/linux-generic/include/odp/plat/event_types.h @@ -18,17 +18,17 @@ extern "C" { #endif - -#include +#include +#include /** @defgroup odp_event ODP EVENT * Operations on an event. * @{ */ -typedef odp_buffer_t odp_event_t; +typedef odp_handle_t odp_event_t; -#define ODP_EVENT_INVALID ODP_BUFFER_INVALID +#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff) #define ODP_EVENT_TYPE_INVALID (-1) #define ODP_EVENT_BUFFER 1 @@ -36,6 +36,12 @@ typedef odp_buffer_t odp_event_t; #define ODP_EVENT_TIMEOUT 3 #define ODP_EVENT_CRYPTO_COMPL 4 +/** Get printable format of odp_event_t */ +static inline uint64_t odp_event_t_print(odp_event_t hdl) +{ + return _odp_pri(hdl); +} + /** * @} */