From patchwork Wed May 11 16:42:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 67594 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp307800qge; Wed, 11 May 2016 09:14:05 -0700 (PDT) X-Received: by 10.140.153.129 with SMTP id 123mr4638143qhz.71.1462983245035; Wed, 11 May 2016 09:14:05 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p64si5637356qha.129.2016.05.11.09.14.04; Wed, 11 May 2016 09:14:05 -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 AC60861099; Wed, 11 May 2016 16:14:04 +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 BDD9461728; Wed, 11 May 2016 15:48:57 +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 3FB246169C; Wed, 11 May 2016 15:48:44 +0000 (UTC) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by lists.linaro.org (Postfix) with ESMTPS id 079EC616A4 for ; Wed, 11 May 2016 15:44:46 +0000 (UTC) Received: by mail-lf0-f47.google.com with SMTP id m64so53872429lfd.1 for ; Wed, 11 May 2016 08:44:45 -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=Jvj1CL9o4v9kx3Zv2wZZ4jmWoUE6NL9W5IghZPQmEdO45ZSFsC7laU5/IVUMUR5NOi e9+dD8tinHeCUudzWXxKUPIqlQepB6mnYqBRcsG/h1Po5GUuZt3XbMnQ73q7akA/qZqN YeS1bk4F7JdlIw+z5SW8Up7oSiTzbLDH9zALq4kAVkxz4D6Nn6iUTD3UWDepDHgaYty2 TRJgzoRLlYHOikmfkzaKqOZOtFRZ86pLPCfNmVoGtFVhT9Od3KziOf9EIKqr+PxAde9y k9PiTbw3LvhxwEwkev3L5zH43COMg4A1VXS+gKlQkNG1fcLc6Rt7VOjFu1ueX0YfCUI4 ZW/A== X-Gm-Message-State: AOPr4FW5pnx1vEj8vhIqdf2H9N2jSjq4t+kbIBlp2LGzaB0s9F2Z+gVTB5kRc0lyVNJ4OMreQpg= X-Received: by 10.112.170.38 with SMTP id aj6mr1931099lbc.29.1462981484905; Wed, 11 May 2016 08:44:44 -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 n37sm1421164lfg.46.2016.05.11.08.44.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 08:44:44 -0700 (PDT) From: Christophe Milard To: brian.brooks@linaro.org, mike.holmes@linaro.org, lng-odp@lists.linaro.org Date: Wed, 11 May 2016 18:42:22 +0200 Message-Id: <1462984942-53326-39-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1462984942-53326-1-git-send-email-christophe.milard@linaro.org> References: <1462984942-53326-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv6 38/38] 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[]