From patchwork Thu May 19 16:27:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 68165 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3280947qge; Thu, 19 May 2016 08:54:55 -0700 (PDT) X-Received: by 10.233.232.213 with SMTP id a204mr15241960qkg.25.1463673295225; Thu, 19 May 2016 08:54:55 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u6si13143293qku.218.2016.05.19.08.54.54; Thu, 19 May 2016 08:54:55 -0700 (PDT) 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D63E6617F8; Thu, 19 May 2016 15:54:54 +0000 (UTC) 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 435786193E; Thu, 19 May 2016 15:32:59 +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 04F0C61819; Thu, 19 May 2016 15:32:43 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 7102A61831 for ; Thu, 19 May 2016 15:29:05 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id e130so3874620lfe.3 for ; Thu, 19 May 2016 08:29:05 -0700 (PDT) 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:in-reply-to :references; bh=SJOxGHwREJh/qDwm0HodL5kfNoScZohHFKgF0fKlmXQ=; b=c39aGEjXsvvXnZTJb9rT69Si/dlGRfd2Wa8KGJbg3u9WsYcbenXTyt8X7UBjPmk2jd xxGnEF3QFFZQYHn9Dzehb8Bt/Cz7ScEY8CrB1cY7gkc5BCCMnmy1BfcbPZnNtr0LxPse dbPpZzCNxohKuWv2ThHGNDxC5HvItpakUoCiEAjl+3xygwgsNmmzfCtJljIVuu4BKKUB W7AZAzlTKDiwDrjFwGk45+MbQwTJwPMrtdGUuH/3U3nSrAzYVRkeXojU+O5gqpLE2WvD 1BGQnURtkf8I2YgQWxi9OiWJRBhJkbh8AUCaVzwl/mZJvx1qmC9RtyytRWUEQzDHzV9l E7zg== X-Gm-Message-State: AOPr4FUqPVB4G+5aF0NAgHVZ2FE88uxP7XUgb7AC8/xGuzoWCWNJFjd5JTICJkaktyz+965QmIo= X-Received: by 10.25.166.77 with SMTP id p74mr4233085lfe.48.1463671744384; Thu, 19 May 2016 08:29:04 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id cv11sm2366290lbb.49.2016.05.19.08.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 08:29:03 -0700 (PDT) From: Christophe Milard To: brian.brooks@linaro.org, maxim.uvarov@linaro.com, lng-odp@lists.linaro.org Date: Thu, 19 May 2016 18:27:14 +0200 Message-Id: <1463675234-6739-36-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> References: <1463675234-6739-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv8 35/35] doc: implementers-guide: adding helper recommendations 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" The implementation guide is updated with recommendations regarding the usage of helpers and some of its functions. Signed-off-by: Christophe Milard --- doc/implementers-guide/implementers-guide.adoc | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/implementers-guide/implementers-guide.adoc b/doc/implementers-guide/implementers-guide.adoc index 8863004..abd49c0 100644 --- a/doc/implementers-guide/implementers-guide.adoc +++ b/doc/implementers-guide/implementers-guide.adoc @@ -506,5 +506,37 @@ from ODP_TEST_INFO_INACTIVE to ODP_TEST_INFO_CONDITIONAL: ------------------ ================= +==== helper usage ==== + +The tests (both platform agnostic and platform dependent tests) make use of +a set of functions defined in a helper library. The helper library tries to +abstract and regroup common actions that applications may perform but +which are not part of the ODP API (i.e. mostly OS system calls). +Using these functions is recommended, as running the tests on a different OS +could (hopefully) be as simple as changing the OS related helper lib. + +In the linux helper, two functions are given to create and join ODP threads: + +`odph_odpthreads_create()` + +`odph_odpthreads_join()` + +These two functions abstract what an ODP thread really is and their usage +is recommended as they would be implemented in other OS`s helper lib. + +Five older functions exist to tie and ODP thread to a specific implementation: + +`odph_linux_pthread_create()` + +`odph_linux_pthread_join()` + +`odph_linux_process_fork_n()` + +`odph_linux_process_fork()` + +`odph_linux_process_wait_n()` + +The usage of these functions should not occur within ODP examples nor tests. +The usage of these functions in other application is not recommended. include::../glossary.adoc[]