From patchwork Wed Jan 21 04:57:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 43431 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E360E2034D for ; Wed, 21 Jan 2015 04:58:14 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id u56sf22316818wes.3 for ; Tue, 20 Jan 2015 20:58:14 -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=pxmA1bu47cPuIg0NVasTagKJevDxKDWncmQZ1X+5Z0c=; b=hzXJXHVgpK6mdHxPdo+zQq9Pp9GnfuBz/hGNLBFOhERL+CwwMtXv0P5QTlPfYBdCXj I5aD95aGq339waBC5wenx3eXZFSICjOKoQey6rRa15nsueSm+XUY/rt/S6bJRSrXrMKu vsb59qT4QZS3pyUoeqzUs0nOuIxHq0mnAz9YKF7mBuvOPBBLxfUrgqJMJ5CEbXZscvlZ dhJtQcG8ED0GCFWHQTHBt6EAYaVFHwmCQEG3dyKkA04vjiSdeJRfHzrlUKWhYEcMJbrG SZbgnPMJpSdP2gJ4aDcbmeGlxTZo0SbdwLcVO+iJaA7oQlHj2R2fhSHn8jA6tk8ZKQLg pW+w== X-Gm-Message-State: ALoCoQk7j3g9mHEJRzsJvBf52d5mS7TuU/xg+AdDXSJAAASqto3PIicLT7NnPPz5RH/I/o7j3/8z X-Received: by 10.180.87.72 with SMTP id v8mr672691wiz.3.1421816294250; Tue, 20 Jan 2015 20:58:14 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.67 with SMTP id de3ls415829lac.60.gmail; Tue, 20 Jan 2015 20:58:13 -0800 (PST) X-Received: by 10.112.55.199 with SMTP id u7mr41101925lbp.74.1421816293961; Tue, 20 Jan 2015 20:58:13 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id jc7si16934200lbc.80.2015.01.20.20.58.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Jan 2015 20:58:13 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id 10so37238963lbg.5 for ; Tue, 20 Jan 2015 20:58:13 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr42599858lag.50.1421816293834; Tue, 20 Jan 2015 20:58:13 -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.9.200 with SMTP id c8csp1651524lbb; Tue, 20 Jan 2015 20:58:13 -0800 (PST) X-Received: by 10.140.39.116 with SMTP id u107mr61523288qgu.98.1421816292469; Tue, 20 Jan 2015 20:58:12 -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 p1si1395811qaa.13.2015.01.20.20.58.11 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 20 Jan 2015 20:58:12 -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 1YDnMn-0002Gh-D2; Wed, 21 Jan 2015 04:58:09 +0000 Received: from mail-ob0-f173.google.com ([209.85.214.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YDnMf-0002A6-4W for lng-odp@lists.linaro.org; Wed, 21 Jan 2015 04:58:01 +0000 Received: by mail-ob0-f173.google.com with SMTP id vb8so11873119obc.4 for ; Tue, 20 Jan 2015 20:57:55 -0800 (PST) X-Received: by 10.60.62.241 with SMTP id b17mr23612403oes.17.1421816275887; Tue, 20 Jan 2015 20:57:55 -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 a15sm2891071oic.18.2015.01.20.20.57.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jan 2015 20:57:55 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 20 Jan 2015 22:57:39 -0600 Message-Id: <1421816266-31223-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421816266-31223-1-git-send-email-bill.fischofer@linaro.org> References: <1421816266-31223-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 1/8] api: event: Add event type 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.217.174 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/Makefile.am | 1 + platform/linux-generic/include/api/odp_event.h | 59 ++++++++++++++++++++++ .../linux-generic/include/api/odp_platform_types.h | 6 +++ 3 files changed, 66 insertions(+) create mode 100644 platform/linux-generic/include/api/odp_event.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index a699ea6..00bb0f9 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -19,6 +19,7 @@ include_HEADERS = \ $(top_srcdir)/platform/linux-generic/include/api/odp_cpumask.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_crypto.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_debug.h \ + $(top_srcdir)/platform/linux-generic/include/api/odp_event.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_hints.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_init.h \ $(top_srcdir)/platform/linux-generic/include/api/odp_packet_flags.h \ diff --git a/platform/linux-generic/include/api/odp_event.h b/platform/linux-generic/include/api/odp_event.h new file mode 100644 index 0000000..48e5c22 --- /dev/null +++ b/platform/linux-generic/include/api/odp_event.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP event + */ + +#ifndef ODP_EVENT_H_ +#define ODP_EVENT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + + +#include +#include + +/** @defgroup odp_event ODP EVENT + * Operations on an event. + * @{ + */ + + +/** + * Event type + * + * @param event Event handle + * + * @return Event type or ODP_EVENT_TYPE_INVALID + */ +int odp_event_type(odp_event_t event); + +/**< Invalid event type */ +#define ODP_EVENT_TYPE_INVALID (-1) +/**< Packet event */ +#define ODP_EVENT_PACKET (ODP_EVENT_TYPE_INVALID + 1) +/**< Buffer event */ +#define ODP_EVENT_BUFFER (ODP_EVENT_TYPE_INVALID + 2) +/**< Timeout event */ +#define ODP_EVENT_TIMEOUT (ODP_EVENT_TYPE_INVALID + 3) + + + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/api/odp_platform_types.h b/platform/linux-generic/include/api/odp_platform_types.h index 6ed9e78..41ea871 100644 --- a/platform/linux-generic/include/api/odp_platform_types.h +++ b/platform/linux-generic/include/api/odp_platform_types.h @@ -65,6 +65,12 @@ typedef uint32_t odp_pktio_t; /** odp_pktio_t value to indicate any port */ #define ODP_PKTIO_ANY ((odp_pktio_t)~0) +/** ODP event */ +typedef uint32_t odp_event_t; + +/** Invalid event */ +#define ODP_EVENT_INVALID ODP_BUFFER_INVALID + /** * ODP shared memory block */