From patchwork Fri May 20 16:30:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 68285 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3862127qge; Fri, 20 May 2016 09:00:07 -0700 (PDT) X-Received: by 10.140.199.8 with SMTP id u8mr4185679qha.5.1463760007226; Fri, 20 May 2016 09:00:07 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w126si18687618qkd.252.2016.05.20.09.00.06; Fri, 20 May 2016 09:00:07 -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 BFD0D617EC; Fri, 20 May 2016 16:00:06 +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 DF04061943; Fri, 20 May 2016 15:37:14 +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 77B9461942; Fri, 20 May 2016 15:37:07 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by lists.linaro.org (Postfix) with ESMTPS id 04C436181E for ; Fri, 20 May 2016 15:32:38 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id e126so25593020lfg.2 for ; Fri, 20 May 2016 08:32:37 -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=IzWvXBdrarXKSkYS+D2Om77AW4WlIjoJmEl1LaEAMzprv7Q5c6M4QxaZYf8DPQSs+a HsVMSAjsct0XDh8uh5RAn9wWgtb8xWpq5btm4B4uTHvDYlUAByXaMFs9MLZZZTZtPLeX qRk4xeWIMijjibRjdQWMKmv9eC4QwIXp4cr/Rpkuo7QvqpXfP9JgYLjg1/uKaqzm7nhF nXk9LMlzD4UoVmZ9FBGKfUxC3Bg2vJC5eiYkABGGEl6qqfsVIR9BhJtPfCeiWidpr+y7 SZh/YPeFCMXDUz38Vg+xvy2v6yOY/5slXszeteDEyQeEas64yrBGT0dARLLSQWk6mB/v B2rw== X-Gm-Message-State: AOPr4FXld3xNq8uZOEIrtjAJr1whfphrA4FEVfyXVCLe1uT+vA+vwBOOtvWQZRo3G/oHZ1506zQ= X-Received: by 10.25.21.156 with SMTP id 28mr1020006lfv.124.1463758356920; Fri, 20 May 2016 08:32:36 -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 tg1sm3348847lbb.7.2016.05.20.08.32.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 May 2016 08:32:36 -0700 (PDT) From: Christophe Milard To: maxim.uvarov@linaro.com, lng-odp@lists.linaro.org Date: Fri, 20 May 2016 18:30:51 +0200 Message-Id: <1463761851-37121-36-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1463761851-37121-1-git-send-email-christophe.milard@linaro.org> References: <1463761851-37121-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv9 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[]