From patchwork Wed Feb 8 12:17:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 93622 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2699968obz; Wed, 8 Feb 2017 04:18:16 -0800 (PST) X-Received: by 10.55.47.69 with SMTP id v66mr19093710qkh.222.1486556296099; Wed, 08 Feb 2017 04:18:16 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d77si5468713qkj.21.2017.02.08.04.18.15; Wed, 08 Feb 2017 04:18:16 -0800 (PST) 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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 32D8B634BE; Wed, 8 Feb 2017 12:18:15 +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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 1A5066347E; Wed, 8 Feb 2017 12:18: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 C5CAD6347E; Wed, 8 Feb 2017 12:18:05 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0135.outbound.protection.outlook.com [104.47.1.135]) by lists.linaro.org (Postfix) with ESMTPS id 5194662FE2 for ; Wed, 8 Feb 2017 12:18:04 +0000 (UTC) Received: from VI1PR07CA0066.eurprd07.prod.outlook.com (10.164.94.162) by VI1PR07MB1629.eurprd07.prod.outlook.com (10.166.142.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Wed, 8 Feb 2017 12:18:02 +0000 Received: from AM1FFO11FD044.protection.gbl (2a01:111:f400:7e00::191) by VI1PR07CA0066.outlook.office365.com (2a01:111:e400:5967::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5 via Frontend Transport; Wed, 8 Feb 2017 12:18:02 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.35 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.35) by AM1FFO11FD044.mail.protection.outlook.com (10.174.64.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 8 Feb 2017 12:18:02 +0000 Received: from fihe3nok1348.nsn-intra.net (10.158.36.136) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 8 Feb 2017 14:18:01 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1348.nsn-intra.net (10.158.36.136) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Wed, 8 Feb 2017 14:18:00 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CHabn022753 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Feb 2017 14:17:36 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v18CHavu022737 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Wed, 8 Feb 2017 14:17:36 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Wed, 8 Feb 2017 14:17:33 +0200 Message-ID: <1486556256-22167-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1486556256-22167-1-git-send-email-petri.savolainen@linaro.org> References: <1486556256-22167-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.35; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39840400002)(39860400002)(39410400002)(39850400002)(39450400003)(2980300002)(199003)(189002)(2351001)(50466002)(50986999)(33646002)(92566002)(48376002)(86362001)(53936002)(76176999)(22756006)(77096006)(8936002)(6916009)(105596002)(36756003)(6666003)(47776003)(2950100002)(575784001)(106466001)(97736004)(5003940100001)(38730400002)(110136004)(356003)(81166006)(81156014)(8676002)(626004)(450100001)(305945005)(50226002)(2906002)(189998001)(5660300001)(68736007); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB1629; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD044; 1:LZGn5SXjNgyi6xpt+oB2jeWHxPkRm18SV8MMWMKu8LXO+rPc0L7WY6WG4DQqa5FhDlIwd0GMAiNTSjZeL55NvqGdHMWJbeYoUFB97+qu9+puNzb3RWP4+OibbBUr5AR6UMNecRdLxg/5J+jhYOPt/tKPAoL2nslWPsidtHFuXSm+ODgsNblYWqCVEYJjGglslptOwp9fpAWTW9cjuzoIjV2SSwK5ugD+oumWITMu6AV+rxw6XhFu5WDnJleMPKBWie/u6EyPm2Vmbk18LUbd2ZkB2uAqQj7l1YLLLzkg/iOuv/OM0pRzlvIfK90A6CO0Fz/CT+zhC+amNH8rudIYR+Sy+t6qrKU+DOaHCmWtf+klPmx6eu/f/FdpfPBFJU2O08S6oXEXW12A1frNsBYuGTDKLL+7XqmccKrSlSw1ET1o+1QKJHl/1TUXErUXjfP8DugG1cjJlUFu7f0hB7uhMf2Ag/361Mi8mqraWvvs/oAb+EsL2iZp2bocqmrx6tiV/x177bzSRFJt80hABG7zFQ== X-MS-Office365-Filtering-Correlation-Id: 97686f0c-1492-470f-c5f1-08d4501c8769 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR07MB1629; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1629; 3:9zyUcJ/2Q7Rg2U2rBFHPPZTvVrBt98/2sa2LIM37LvUR963i23rgbtventNmCS3EybaN5IjsgPHkIbMTGaueMms9NrFLDdJ7FHQvzpFgWLGhpgS9xMfC1qi+deZh4nQbAGOEy7Q+r3Jax4J3NAS+5VyYswWPZdUJ9o5NPAVj3Job74v2L3KGjVoQD9r66fnkr42ZXGyJculQ6ULvVIIzEEgga7+miK5tf4ZY7KeZsPwLlsjYEFb2YmWUCLf4NZO2BHaBpEc0udUwOpog6UcoyQB2xehndpMDNBa06RL21bu8nQJg8DnnmA0nYLWc74TGfe5lmaL+OnsP/oCoLRzroZuynveFNPoB4Z6Dqcq79P0=; 25:uleAWRLdJ0H9+8gXjOPgx48V9Dw1pTySHtyIkNZm+PJ9GD/xBT8gMDdK1hEGhRRzqtsEkS0YBf49Zi9mn7C0VLCoRjbAfpNVPxuEYRXNZNn1E95wMYEQFIEB7gjv8wNRPiiPnI/2Sftw733hp4fwddj2zS9V01D/WhiP/lsDM5mT3GW5Pfp974/+PqVj/n2vQQmDyjffGG4XI/kVR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FFYPJpLshYL1jDoTDmERhOLZcLoaYkij+QWNxkWFKZe2vDZY8dPMJCQCZ0qabX1iPYABJOHGBPLqlyUlC8H8oQjQ831I9w/6npYg6fO4mrlmKJQIIyc0oRBHAKDA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(20170203043)(13016025)(5005006)(2017020702029)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123558025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:VI1PR07MB1629; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB1629; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1629; 4:6TvWjvL6wcp3IhSaoEgUtxciFL7kNg9ChPXZZ6bL/1La4gsKztzYowaTkRMbR97rBSi2FUUxGmW99hyBsqBsIrbmitk1rTVoh2D1wpZzrwZEPqPSoc8jGlr3WsDYPsIwtXDT6bvmZHuYF1aO3BeOp3A8ylU/bESsORgZaU2+eSETw8cPeeji+YYwd2MJTRsj+ORSimE9CpojMnuREA+1lklwE9psSVRrag4csl4LG5dqhMdbVns66BPbE/zoIR8bdfZZLGGH7OMtYLC7Ybl/pD/nvUWAA42u/2jEpKIzGewCjuzftjJJolB7DbKWPiYBfh4HNsJwROHjKUjcJE8Y4U4oY0byYzc2fqCT8YeHq6qbsc5hmtfuq8nL5z9jYjcmxVxvOz7BXTgGybFmiaO5o8dNTKMYzslrKKPiHvPavMiRtS+v3huE+YYKp7Dc0fSLp9ejR+Sj7V1RHAfcYKsR5o/xJ8Sb6uc89ZeUFmWlmtBfRK3Ws64LewL2iNjH5V9LlLZegphCJAK5mk72u+RthL8SNwBpOIKOoUJNgFp3HBVLcr8rWxC94X35ohAjFiiABY3qPpVGI8d3Zzwcqtde98Z18dRq80Xieusc6OZ1I1glB9nWTwCaNgNvouZvfN6lhP+96n12ocOhg32Nfzz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diagnostics: 1; VI1PR07MB1629; 7:+wElIT1II7Jzsru/BF+YHVenJropbrvH/jbBWFGRIAZPyvhhUjC/vmsfYIPhaSYWZ44Wm5aLN10QRCm5+xOlJMZ1y6mYOo3J29fQUsPnlgd+NvvV6ZQxMZC74B5vZLRacEKRcRynzTNxpv5ujG28ZGlzf6vvoNhG5kJOBT0HDzpMZeQSDosFXoXTji+uaxPGTC19bBzJ6SzAhmQF3RupuhKPAm3biB+T8Re+zjdzP9WwmIfS+8OnunOEvy79ZDQFJ95hyKODe1R8LOfvwF3ne7pquxj1jgR/H7wQoOyckB6BXuZVXs2GZ3ElNZ/rAbBUCQY2eyNYqfqo0KyjYbr0fOh0eDUEU9CdgoaaRawy10eyB3SjlC3J9YudAIs4m9NGKFGVSzywr7vZiXgZL1Qr0IOqS18n8ZOfQRY++hOmPx3mVpVXUy67ApujKBHYxdE+0p5YnaCGzKfzwvvLjD75FbM0bWh6dYQbzNADaEOYtqApuLiEW+qWqzu5+XEb3f/3nRQOgM14KaLECZiiiSHS4g== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 12:18:02.6465 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.35]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB1629 Subject: [lng-odp] [PATCH v2 2/5] linux-gen: ticketlock: inline also in application 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Enable ticketlock function inlining in applications when not building for ABI compatibility. Signed-off-by: Petri Savolainen --- platform/linux-generic/Makefile.am | 1 + .../include/odp/api/plat/ticketlock_inlines.h | 19 +++++++++++- .../include/odp/api/plat/ticketlock_inlines_api.h | 36 ++++++++++++++++++++++ .../linux-generic/include/odp/api/ticketlock.h | 4 +++ platform/linux-generic/odp_ticketlock.c | 24 +++------------ 5 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 platform/linux-generic/include/odp/api/plat/ticketlock_inlines_api.h -- 2.8.1 diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 576fedf..64b0287 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -94,6 +94,7 @@ odpapiplatinclude_HEADERS = \ $(srcdir)/include/odp/api/plat/thread_types.h \ $(srcdir)/include/odp/api/plat/thrmask_types.h \ $(srcdir)/include/odp/api/plat/ticketlock_inlines.h \ + $(srcdir)/include/odp/api/plat/ticketlock_inlines_api.h \ $(srcdir)/include/odp/api/plat/ticketlock_types.h \ $(srcdir)/include/odp/api/plat/time_types.h \ $(srcdir)/include/odp/api/plat/timer_types.h \ diff --git a/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h index 87432a7..ecbea7c 100644 --- a/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h @@ -13,11 +13,12 @@ #ifndef _ODP_PLAT_TICKETLOCK_INLINES_H_ #define _ODP_PLAT_TICKETLOCK_INLINES_H_ -#include #include #include #include +#include + /** @internal * Acquire ticket lock. * @@ -110,4 +111,20 @@ static inline int _odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock) odp_atomic_load_u32(&ticketlock->next_ticket); } +/* Include inlined versions of API functions */ +#include +#if ODP_ABI_COMPAT == 0 + +/** @ingroup odp_locks + * @{ + */ + +#include + +/** + * @} + */ + +#endif + #endif diff --git a/platform/linux-generic/include/odp/api/plat/ticketlock_inlines_api.h b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines_api.h new file mode 100644 index 0000000..5efe696 --- /dev/null +++ b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines_api.h @@ -0,0 +1,36 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Ticketlock inline functions + */ + +#ifndef _ODP_PLAT_TICKETLOCK_INLINES_API_H_ +#define _ODP_PLAT_TICKETLOCK_INLINES_API_H_ + +_ODP_INLINE void odp_ticketlock_lock(odp_ticketlock_t *lock) +{ + return _odp_ticketlock_lock(lock); +} + +_ODP_INLINE int odp_ticketlock_trylock(odp_ticketlock_t *lock) +{ + return _odp_ticketlock_trylock(lock); +} + +_ODP_INLINE void odp_ticketlock_unlock(odp_ticketlock_t *lock) +{ + _odp_ticketlock_unlock(lock); +} + +_ODP_INLINE int odp_ticketlock_is_locked(odp_ticketlock_t *lock) +{ + return _odp_ticketlock_is_locked(lock); +} + +#endif diff --git a/platform/linux-generic/include/odp/api/ticketlock.h b/platform/linux-generic/include/odp/api/ticketlock.h index 85be4bc..e0f5d81 100644 --- a/platform/linux-generic/include/odp/api/ticketlock.h +++ b/platform/linux-generic/include/odp/api/ticketlock.h @@ -19,6 +19,10 @@ extern "C" { #include +#if ODP_ABI_COMPAT == 0 +#include +#endif + #include #ifdef __cplusplus diff --git a/platform/linux-generic/odp_ticketlock.c b/platform/linux-generic/odp_ticketlock.c index f18d78f..f73dd9a 100644 --- a/platform/linux-generic/odp_ticketlock.c +++ b/platform/linux-generic/odp_ticketlock.c @@ -5,6 +5,7 @@ */ #include +#include void odp_ticketlock_init(odp_ticketlock_t *ticketlock) { @@ -12,22 +13,7 @@ void odp_ticketlock_init(odp_ticketlock_t *ticketlock) odp_atomic_init_u32(&ticketlock->cur_ticket, 0); } -void odp_ticketlock_lock(odp_ticketlock_t *lock) -{ - return _odp_ticketlock_lock(lock); -} - -int odp_ticketlock_trylock(odp_ticketlock_t *lock) -{ - return _odp_ticketlock_trylock(lock); -} - -void odp_ticketlock_unlock(odp_ticketlock_t *lock) -{ - _odp_ticketlock_unlock(lock); -} - -int odp_ticketlock_is_locked(odp_ticketlock_t *lock) -{ - return _odp_ticketlock_is_locked(lock); -} +/* Include non-inlined versions of API functions */ +#if ODP_ABI_COMPAT == 1 +#include +#endif