From patchwork Fri Dec 18 13:49:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 58664 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp1037720lbb; Fri, 18 Dec 2015 05:50:11 -0800 (PST) X-Received: by 10.140.142.206 with SMTP id 197mr5247899qho.77.1450446611175; Fri, 18 Dec 2015 05:50:11 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 143si16256623qhe.125.2015.12.18.05.50.10; Fri, 18 Dec 2015 05:50:11 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6A130615F2; Fri, 18 Dec 2015 13:50:10 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=XR0IXm4o; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id ACE72615F4; Fri, 18 Dec 2015 13:50:05 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5860E615F5; Fri, 18 Dec 2015 13:50:03 +0000 (UTC) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by lists.linaro.org (Postfix) with ESMTPS id 2216D615F2 for ; Fri, 18 Dec 2015 13:50:02 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id l133so72633680lfd.2 for ; Fri, 18 Dec 2015 05:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=3/RwtSQpHWwmhIsz2VhHBXWIsMUKiSCUTDRTzOC6dL4=; b=XR0IXm4oy4k+DTjOSCb2gIXclM0AHcxhDgH+YP3qJPB5VQJekjVp68iSKzcqE3Z3gI n+fvVsx0B+dthkThAVZoY5mQFQUkv07JUvgtcyh4x9qZznpKlKtXqgPZvplbbPwG/AYX CzxHKUG/Pr2xuGuz51ChOlQQs+KVrg90wNY08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3/RwtSQpHWwmhIsz2VhHBXWIsMUKiSCUTDRTzOC6dL4=; b=lwdGnnZD8n69hti+FUzY+k3veROcnAWGgVuXp84RR/NrTKDMXY5xDSdzr2eWxc8XJm eFQ8olfDKgySGyeC/ORQAxthDEwmN7WIS79LqV3B1eZOIPszUszhurjWR6/LAIxjpFrX Ut6J2HfpNn5O9dOqh1stScYMiDusp8RSQAHPruKs52egAC4yMNoWDVmKI20kQ97EEhlc G2G+C+qDEZlQwUwgmLd3F44U+nHua7RkaKz/BAZz9anRTiGYM5XK5WXMMyq0U0nouZr3 m5Y+1xBpCJ7QSpFTXThXVYU+l1XcDlFPMX39h+VVnloRqbuLON1eJGc99WveuZRqVQZG SwqA== X-Gm-Message-State: ALoCoQkPYdTN7skGpVFHCwjQrjceY832ue9JqiMqfq7zzJu7DFGoP3iC9uphmD0zYLXUM2vV4Z9bnFN3tpxyqRE0TsnRKsvJiA== X-Received: by 10.25.84.76 with SMTP id i73mr1182632lfb.43.1450446600972; Fri, 18 Dec 2015 05:50:00 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id p69sm2810782lfe.42.2015.12.18.05.49.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 05:50:00 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Fri, 18 Dec 2015 15:49:54 +0200 Message-Id: <1450446594-30963-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [lng-odg] [PATCH] doc/users-guide: add time API section X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Signed-off-by: Ivan Khoronzhuk --- doc/users-guide/users-guide.adoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index 7ec7957..d2b5480 100644 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -197,7 +197,7 @@ precise syntax and semantics of each API. ODP programs are built around several conceptual structures that every application programmer needs to be familiar with to use ODP effectively. The main ODP concepts are: -Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Timer, +Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Time, Timer, and Synchronizer. === Thread @@ -305,6 +305,19 @@ or may represent a device attached via a PCIE or other bus. PktIOs are represented by handles of abstract type +odp_pktio_t+. +=== Time +The time API is used to measure time intervals and track time flow of an +application and presents presents convenient way to get access to time source. +The time API consists from two main parts: local time API and global time API. +The local time API is supposed to be used within one thread and can be faster +then global time API. The local time API cannot be used between threads as time +consistency is not guaranteed, and in some cases that's enough. The global time +API is supposed to be used for tracking time between threads. Both local and +global time is not wrapped during application life cycle. The time API includes +functions to operate with time, such as sum, diff, resolution, wait. +The odp_time_t opaque type represents or local or global timestamp, the +responsibility is on a user to use time operations with appropriate time type. + === Timer Timers are how ODP applications measure and respond to the passage of time. Timers are drawn from specialized pools called timer pools that have their