From patchwork Tue Feb 3 04:44:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 44197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 493662034D for ; Tue, 3 Feb 2015 04:46:24 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id l61sf18864738wev.0 for ; Mon, 02 Feb 2015 20:46:23 -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=JGZ0tT0tj8rYRYpoK4FUbxoghZC7NF5apIbAWsIB93w=; b=LDIKCfFYWXChyp2PhXWBwUwpKHg1KuKNf9mPbODf4czfxsENQYjSDAEdSOL68c/eO0 HiC7noWqDO6oa5DiXPFSCRsRcF1AmwmjidB1WegJ2qIe3P+cvjKAAv1SA+wN7Tw/17fm fBvzxSfz6f7aBvlUey0Wu1cMPBxgND9/1OkVnUXdJ9i5aFKFS0bkHp5UryE4sbYpkFmD vDEf+iysfcWOYhd5t/PKU2EWDwS25SzY7qGgSGtXjunfOHbEcD9KoDk7aJOzJvsAik7t N/mFgR7r4WJ2+p35gGIBiNklPzYYAC0NcAgAZBPm++dqCbdF4tjnesgrwyN5mlUe73Wx BEeQ== X-Gm-Message-State: ALoCoQksXK7+hRTAiBMTGnU1puY66RvYs4rCWL3bAgZ7t4y1oakYeqhNBFoDaxcZIha956eazuWu X-Received: by 10.112.37.72 with SMTP id w8mr2741206lbj.6.1422938783541; Mon, 02 Feb 2015 20:46:23 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.169 with SMTP id x9ls709664lad.72.gmail; Mon, 02 Feb 2015 20:46:23 -0800 (PST) X-Received: by 10.113.11.12 with SMTP id ee12mr22496360lbd.79.1422938783087; Mon, 02 Feb 2015 20:46:23 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id s10si5329673las.78.2015.02.02.20.46.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 20:46:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so47906722lab.12 for ; Mon, 02 Feb 2015 20:46:23 -0800 (PST) X-Received: by 10.152.228.161 with SMTP id sj1mr1786947lac.74.1422938783018; Mon, 02 Feb 2015 20:46:23 -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 h5csp1712529lbj; Mon, 2 Feb 2015 20:46:22 -0800 (PST) X-Received: by 10.224.2.71 with SMTP id 7mr50423697qai.94.1422938782280; Mon, 02 Feb 2015 20:46:22 -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 z4si26387877qge.110.2015.02.02.20.46.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 20:46:22 -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 1YIVNT-0006AW-EC; Tue, 03 Feb 2015 04:46:19 +0000 Received: from mail-oi0-f46.google.com ([209.85.218.46]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIVMo-00061C-5I for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 04:45:38 +0000 Received: by mail-oi0-f46.google.com with SMTP id a141so47626107oig.5 for ; Mon, 02 Feb 2015 20:45:32 -0800 (PST) X-Received: by 10.60.120.2 with SMTP id ky2mr14335377oeb.24.1422938732917; Mon, 02 Feb 2015 20:45:32 -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 vs5sm10277537oeb.14.2015.02.02.20.45.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Feb 2015 20:45:32 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 2 Feb 2015 22:44:54 -0600 Message-Id: <1422938699-12877-15-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422938699-12877-1-git-send-email-bill.fischofer@linaro.org> References: <1422938699-12877-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 14/19] 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.53 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 --- platform/linux-generic/include/odp/plat/event_types.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/event_types.h b/platform/linux-generic/include/odp/plat/event_types.h index 4a0756b..8db4b80 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_to_u64(odp_event_t hdl) +{ + return _odp_pri(hdl); +} + /** * @} */