From patchwork Fri Apr 25 10:02:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 29050 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A4F9202E6 for ; Fri, 25 Apr 2014 10:03:11 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf12585992qcx.5 for ; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=pucIQ6MWuSCtsSHfIWNQUkFHYR8E5+UYFVuTMFHGnnI=; b=HFA8EwIiAohiluEfmZ1AjGfrT/ppuNx7P2W1C0kd86O+Nk1GKR5HqzZkBXuyN9eXok GRWp7L/uEpHO8prXXk9kAPytQSx0HO/8TTaFRD2NBp5DCqJddedQrrCfU/VOauonufuc WKlx0gcrtgCNcWaorL/i1SPb57RpVsshwgF+Ztrl6SqtPrg9+t5ESepy4UNSq1MDEwWV mzhO2dvIXSuO+mB6m6g4b/fiuc37AsqpsQH8T+HIxHxuiIjfSj0r5ACuUArP8gZAMFf6 a9zgKdSwwxXVmNJOFXkUKLIbEWk8JbOwnHN4pHVlaoC+Zu2FTxUUp0TYhH1mc4CjNlZQ k6DA== X-Gm-Message-State: ALoCoQlbt/k/p7ERfnklsiZ1bJmugFs/BEREGNgDCUuHmvQnPnL8z4LZ5MTuBtyMEoPsAUwWThT6 X-Received: by 10.58.112.1 with SMTP id im1mr3876703veb.33.1398420191240; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.247 with SMTP id b110ls1444522qge.16.gmail; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) X-Received: by 10.58.230.103 with SMTP id sx7mr753974vec.28.1398420191127; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id tc5si1582469vcb.215.2014.04.25.03.03.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 03:03:11 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so4470594vcb.16 for ; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr470473vcb.30.1398420191030; Fri, 25 Apr 2014 03:03:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp85321vcb; Fri, 25 Apr 2014 03:03:10 -0700 (PDT) X-Received: by 10.224.6.10 with SMTP id 10mr9950183qax.45.1398420190554; Fri, 25 Apr 2014 03:03:10 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id t17si3597171qge.82.2014.04.25.03.03.08 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 25 Apr 2014 03:03:10 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wdcxx-0004T9-AE; Fri, 25 Apr 2014 10:02:45 +0000 Received: from mail-la0-f42.google.com ([209.85.215.42]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wdcxq-0004T4-W4 for lng-odp@lists.linaro.org; Fri, 25 Apr 2014 10:02:39 +0000 Received: by mail-la0-f42.google.com with SMTP id mc6so1777838lab.1 for ; Fri, 25 Apr 2014 03:02:56 -0700 (PDT) X-Received: by 10.152.43.107 with SMTP id v11mr590587lal.49.1398420176390; Fri, 25 Apr 2014 03:02:56 -0700 (PDT) Received: from maxim-lap.localhost.onion ([92.39.133.154]) by mx.google.com with ESMTPSA id jm3sm7598878lbc.29.2014.04.25.03.02.54 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 03:02:55 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 25 Apr 2014 14:02:51 +0400 Message-Id: <1398420171-7187-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 Subject: [lng-odp] [PATCH] doxygen clean up odp_common.[ch] X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Maxim Uvarov --- test/api_test/odp_common.c | 12 +++++++++--- test/api_test/odp_common.h | 11 ++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c index 5c7a487..b1b87bc 100644 --- a/test/api_test/odp_common.c +++ b/test/api_test/odp_common.c @@ -19,10 +19,13 @@ /* Globals */ -static odp_linux_pthread_t thread_tbl[MAX_WORKERS]; -static int num_workers; -__thread test_shared_data_t *test_shared_data; +static odp_linux_pthread_t thread_tbl[MAX_WORKERS]; /**< worker threads table */ +static int num_workers; /**< number of workers */ +__thread test_shared_data_t *test_shared_data; /**< pointer to shared data */ +/** + * Print system information + */ void odp_print_system_info(void) { odp_coremask_t coremask; @@ -48,6 +51,7 @@ void odp_print_system_info(void) printf("\n"); } +/** test init globals and call odp_init_global() */ int odp_test_global_init(void) { memset(thread_tbl, 0, sizeof(thread_tbl)); @@ -65,6 +69,7 @@ int odp_test_global_init(void) return 0; } +/** create test thread */ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg) { /* Create and init additional threads */ @@ -74,6 +79,7 @@ int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg) return 0; } +/** exit from test thread */ int odp_test_thread_exit(pthrd_arg *arg) { /* Wait for other threads to exit */ diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h index f5183e1..f321b6b 100644 --- a/test/api_test/odp_common.h +++ b/test/api_test/odp_common.h @@ -13,8 +13,9 @@ #ifndef ODP_COMMON_H #define ODP_COMMON_H -#define MAX_WORKERS 32 +#define MAX_WORKERS 32 /**< Maximum number of work threads */ +/** types of tests */ typedef enum { ODP_ATOMIC_TEST = 0, ODP_SHM_TEST, @@ -24,13 +25,17 @@ typedef enum { ODP_MAX_TEST } odp_test_case_e; +/** + * Thread argument + */ typedef struct { - int testcase; /* specifies which set of API's to exercise */ - int numthrds; /* no of pthreads to create */ + int testcase; /**< specifies which set of API's to exercise */ + int numthrds; /**< no of pthreads to create */ } pthrd_arg; extern void odp_print_system_info(void); extern int odp_test_global_init(void); +/** create thread fro start_routine function */ extern int odp_test_thread_create(void *(*start_routine) (void *), pthrd_arg *); extern int odp_test_thread_exit(pthrd_arg *);