From patchwork Tue May 17 13:04:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 67982 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2084479qge; Tue, 17 May 2016 06:44:29 -0700 (PDT) X-Received: by 10.55.82.6 with SMTP id g6mr1620030qkb.40.1463492669159; Tue, 17 May 2016 06:44:29 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x145si2261979qkb.139.2016.05.17.06.44.28; Tue, 17 May 2016 06:44:29 -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 C7D7261614; Tue, 17 May 2016 13:44:28 +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 1E77561615; Tue, 17 May 2016 13:17:09 +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 CCAA1617BF; Tue, 17 May 2016 13:16:59 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id F3CFC617BF for ; Tue, 17 May 2016 13:05:40 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id j8so6499830lfd.2 for ; Tue, 17 May 2016 06:05:40 -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=Jcbl6HRRRb49aPYlhZnMUmdxkz6aI2DaE9QQPw4f1iv/bQMiShxJrddy1FDT9caeIf NcfqwbiavUH++r4RhP34MsbDxPaHfm5LQtnHCeUmopBJd9c44sJg0yGAw7n+9lCHil7X WvuwwCqkNbYypWgqWwLTC2k+tlVJThsiabLIcbZ4cGx0UMmQhFUykr83AhKZdhNBgvzm Vj+if0azXHuRX99O5MNi+Dhaj2s+NwX041BlghFbWIzDFIXDIS71aUoEGO1B6HvRUKiT BDG7Nhj7FeO+juij+uIb5H/Z0pYkY/nr0DCPXhESGidNb4mw4IUHy2+li3z4qSoMqRBt LplA== X-Gm-Message-State: AOPr4FWRMYUlNK65m2o3GqhTLg0c++id6Tx1a6HmZ+hd5C9LX/XZcTpWTFuK1rmn/nJyu0BYR7k= X-Received: by 10.25.43.85 with SMTP id r82mr432189lfr.63.1463490339910; Tue, 17 May 2016 06:05:39 -0700 (PDT) Received: from localhost.localdomain (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by smtp.gmail.com with ESMTPSA id q1sm506536lbo.4.2016.05.17.06.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 May 2016 06:05:39 -0700 (PDT) From: Christophe Milard To: lng-odp@lists.linaro.org, brian.brooks@linaro.org, mike.holmes@linaro.org Date: Tue, 17 May 2016 15:04:42 +0200 Message-Id: <1463490282-23277-36-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463490282-23277-1-git-send-email-christophe.milard@linaro.org> References: <1463490282-23277-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv7 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[]