From patchwork Thu Mar 30 13:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96298 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp253412qgd; Thu, 30 Mar 2017 07:02:38 -0700 (PDT) X-Received: by 10.237.53.177 with SMTP id c46mr7230934qte.124.1490882558455; Thu, 30 Mar 2017 07:02:38 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l14si1907534qtl.15.2017.03.30.07.02.38; Thu, 30 Mar 2017 07:02:38 -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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0263D63536; Thu, 30 Mar 2017 14:02:37 +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 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 D8B706353C; Thu, 30 Mar 2017 13:59:35 +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 5C30D60BED; Thu, 30 Mar 2017 13:59:26 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0118.outbound.protection.outlook.com [104.47.1.118]) by lists.linaro.org (Postfix) with ESMTPS id 06A1460C60 for ; Thu, 30 Mar 2017 13:59:21 +0000 (UTC) Received: from HE1PR0701CA0030.eurprd07.prod.outlook.com (10.165.214.168) by AM4PR07MB3364.eurprd07.prod.outlook.com (10.171.189.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 30 Mar 2017 13:59:19 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by HE1PR0701CA0030.outlook.office365.com (2603:10a6:3:5::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.8 via Frontend Transport; Thu, 30 Mar 2017 13:59:19 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Thu, 30 Mar 2017 13:59:18 +0000 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 v2UDwulf028527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 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 v2UDwu7L028515 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 30 Mar 2017 16:58:56 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 30 Mar 2017 16:58:54 +0300 Message-ID: <1490882336-13721-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> References: <1490882336-13721-1-git-send-email-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(39400400002)(2980300002)(189002)(199003)(9170700003)(50226002)(189998001)(33646002)(50986999)(356003)(86362001)(5003940100001)(50466002)(36756003)(47776003)(2950100002)(6916009)(105596002)(53936002)(77096006)(8936002)(5660300001)(76176999)(110136004)(38730400002)(2906002)(305945005)(106466001)(81166006)(22756006)(8676002)(48376002)(2351001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB3364; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT034; 1:P7Tp82nwXUOK7Z7AgWBNwje3we0q2fwMUu39fSFDWwMTPSk7U0VFVcWeKEFP2GYqchkRfjzYXGpxTQ/z309wtctPyLFTX0YFiyzNF1+ESg7UnOnGpzqckEw77G1ybJpGHH4L3xTlAP8FlkEd4KMqC1Kqz/lCRXBGd/xcZ+qotSl+bL5sKiF9X/HJa3Xu0BnF4jzf62A7wIjuAwU95VPQgpUhPG/YbmyYY/vOEA18Sh4SIXQ8UKtAaNUhoBGIrHxaLpvYXkg/nN/D+z+i2zoTlk4OHeBBWKvGfUworCj3CaSjkQG2JXosO9LlRWIJDX0uqw3YP1zSsgpq3C/ycg1QtQYEDsCyKgyhZBfOrRyif3ALd8Y4qQEGaZZT472fY+7v6tfw0MjOTQ2MeFJ0/6zLWN7RkpWnI+8LRBJiCRiQMXXpszSvYnH6h264FKG8WtYsD0Z6XK/WDRkm0+N01QOxFnwzqET3bNOontqEokhm/XdL9wLERKfxR28qs8epdLw/ERJHkuHWi31r7Z0jjU4bUg== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 415cffb8-f74b-443e-97b8-08d47774f5e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(2017030256075)(201703131423075)(201703031133081); SRVR:AM4PR07MB3364; X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 3:9ZaoAmJjuWMmIxyToiU5pVhNqWGnkB6GFNudFYRTVloK7nE9wc52YoeQc1CBtEb7DjILS+p6/poHzAdLfD+aXQxLU0xGC6e2pNWjN168X4pTZc3+GfBKyCwCOZFplbnaMGKO5N92QyBytjMOdl0DpaoWJiWw03R1xxw4ISvV8cwOzLkwws0jWlSoIGsjh54+uF/0Zq7qRd7FFfrp43zfc1C+499ULhB+7SduBYsmEJRJTWTx7AYobE0o5dTc0p7i5aIGq2rN0ofixso8rmj2k0QLBU6SyYRqRM7Qc85U5RsiRdm5sSF6H53P07G4Xcb5f/L9bMaVQAxUBG1+vHoo8BO5EQnq5KHv2ddRtbNRvQZUID3gLyU74TvuyFxfjN2vasMF77iuSvJlgv8ZH0qezfag4fN4DFl0VHFJ/cFydgp2gBc1gNglS64+gymyFptlmmwEKc47w7EL9tw5p4Kk1pMVS6TkIA+ZG6oxY6LH6pmVIO+zo9BdPgXeUUKyTl9z X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 25:gZPfaPnyT+6yyFpaz3zKE7MqHCKR68YSE7VqYndoetil38hXZML2x7cipn4cdSSVRXwhp8pQkJMfXmArltPyD3wWPJDS0ap2+5I+DXHD/KPU979GqxVmPQtRUNWhOQIJFwrrQxUpIFYh52CxUwE/x/v0oY9RcUjdBJSuOwYM27LoKvBy/WS1QjVWBRjuhRMBaFXAArcyVbJpogd27k7xgmgx9jz0ezuCfg1ieM2nFMgyhJsKnu84UMGWQJOuB2F3RHs8O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V1ENrOMDTmAMmhlG+nGnCSs+iYnUPknlCRaFJ80CjxIfkU0u9BIHFu/9R9Ksij83FZ5RT0dTWI2bfYMOeRLINzTEI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(5005006)(8121501046)(13013025)(13021025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:AM4PR07MB3364; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB3364; X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB3364; 4:tslj+U77fOSgl4IpPA87KsfqqwQ1zlQJ+NiQq7luy1BYF1gLmITvivL7RRMYaW68H2eHG9KgZ6JGOFqU9uMTyqOgwXKongjM2Z5HXn9eah7/IfawNHeC32sE0lBcs7ZiJGzflRV3E7eAIFc7QxH/1/xilCwnBVytoV7fwbsA0yOTmZHpnwrSR2Bld1R/damvdZmo7DvO4hZEyw+JrKfeGtUqk5DbXxD8cCqCi0eXOR30esFbQOmjcXm4wLElWr2ad4YX4gzUj5Fppmq7tw2lBWups5l/48qs/WZK/YwpQEmsyIBWfz+Y8Z6dL9rX5Lj3vue9voHugyaKXgGtIVNv4NRvOEyM0++aoFxWC2zvMmkCbODhFIyVRku6Y5zF/U2hQQx8bHzOYuV/++x+qTrnwCFPYjEla+khxz3Uz2NC+ih3ntjbPdzY2DFdvXI7dt1mrzVXGs5FGSWuZfoT0wQTtdA28RwoOWYa8H9UaHBzGB187zA9y4Bt4CHwlDYiTPegy6JsjqB0WwrHjLTOp69GYs+HhKsLq/4dbRIrhHksIqicDSyxHcx1xkPG9KdwT1eB4dptsXBdJ5y/lOKrgiiKIy7E4za8jd5ZUUQ6J4CqeVhoOvVokg6V8ApVLAQXvyJ/RvcpTu26Q1qPncA2pCtBs4knYAd4Kt01vWNv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HmN86EID4XKpL8U2hJSWbPtGWoKZsrBYMOFmgei3PWPUDr3G6x0e7vxJJUTDnYJEPFUnA3m+QOEdfJg349Zy24/CAJFjn8VQcwwUPIbPzOZrMBIOIPrtJJhzKvfC/PhLkiAjGEXYXSIy4AA2tIDwaWHi0kx6OZGpxGgz+Zv+OYqqzGTtevxQ7m7C2Oxvhr9rYDzyZ6o55eKQz2eRX/Ng4sLs54kl7o9O85BQAHpCBn/R+XMIcTEumzFMz6kDLQlRQ8log== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2017 13:59:18.9321 (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.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3364 Subject: [lng-odp] [API-NEXT PATCH v2 2/4] api: deprecated: add configure option and macros 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" Added configuration option --enable-deprecated to control if deprecated APIs are enabled or disabled. Added ODP_DEPRECATED_API macro into the API. Its value can be used to check if deprecated API definitions are enabled or disabled. Deprecated APIs are disabled by default. Deprecated APIs are meant to be removed completely in a later API version. Added ODP_DEPRECATE() macro to enforce deprecation of API definitions. When deprecated APIs are disabled, the macro renames API definitions so that application cannot use those any more, but a single implementation library can serve applications built with both options. Signed-off-by: Petri Savolainen --- configure.ac | 19 +++++++- doc/application-api-guide/api_guide_lines.dox | 6 +-- doc/platform-api-guide/Doxyfile | 1 + doc/process-guide/release-guide.adoc | 6 +-- include/odp/api/spec/.gitignore | 1 + include/odp/api/spec/deprecated.h.in | 50 ++++++++++++++++++++++ include/odp_api.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp/api/deprecated.h | 26 +++++++++++ 10 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 include/odp/api/spec/deprecated.h.in create mode 100644 platform/linux-generic/include/odp/api/deprecated.h -- 2.8.1 diff --git a/configure.ac b/configure.ac index 419c136..fe1e5b0 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,8 @@ ODP_VERSION_API_MAJOR=odpapi_major_version AC_SUBST(ODP_VERSION_API_MAJOR) ODP_VERSION_API_MINOR=odpapi_minor_version AC_SUBST(ODP_VERSION_API_MINOR) -AC_CONFIG_FILES([include/odp/api/spec/version.h]) +AC_CONFIG_FILES([include/odp/api/spec/version.h + include/odp/api/spec/deprecated.h]) AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) @@ -284,7 +285,7 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" ODP_ABI_COMPAT=1 abi_compat=yes AC_ARG_ENABLE([abi-compat], - [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], + [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], [if test "x$enableval" = "xno"; then ODP_ABI_COMPAT=0 abi_compat=no @@ -294,6 +295,19 @@ AC_ARG_ENABLE([abi-compat], AC_SUBST(ODP_ABI_COMPAT) ########################################################################## +# Enable/disable deprecated API definitions +########################################################################## +ODP_DEPRECATED_API=0 +deprecated=no +AC_ARG_ENABLE([deprecated], + [ --enable-deprecated enable deprecated API definitions], + [if test "x$enableval" = "xyes"; then + ODP_DEPRECATED_API=1 + deprecated=yes + fi]) +AC_SUBST(ODP_DEPRECATED_API) + +########################################################################## # Default warning setup ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes" @@ -379,6 +393,7 @@ AC_MSG_RESULT([ static libraries: ${enable_static} shared libraries: ${enable_shared} ABI compatible: ${abi_compat} + Deprecated APIs: ${deprecated} cunit: ${cunit_support} test_vald: ${test_vald} test_perf: ${test_perf} diff --git a/doc/application-api-guide/api_guide_lines.dox b/doc/application-api-guide/api_guide_lines.dox index 394e958..a6488c3 100644 --- a/doc/application-api-guide/api_guide_lines.dox +++ b/doc/application-api-guide/api_guide_lines.dox @@ -75,7 +75,7 @@ The former is a compile-time assertion and hence adds no additional path length. The latter is controlled by the ODP_NO_DEBUG compile-time switch and so is suitable for use in development/debug builds that can be compiled out for production use. Other mechanisms available to the implementer are: - ODP_ABORT() is provided for situations where further execution of the code must not occur and a level of tracing information should be left in the log. - - ODP_DEPRECATED() is used to signify that a call is planned for obsolescence. + - ODP_DEPRECATE() is used to signify that a call is planned for obsolescence. - ODP_LOG() is used to direct implementation messages to the application. @@ -197,8 +197,8 @@ This is one of the reasons why some features MAY be defined as OPTIONAL. While allowed, the proliferation of OPTIONAL features SHOULD be avoided to enable broad application portability across many implementations. At the same time, a "least common denominator" approach MUST NOT be taken as that defeats the purpose of providing higher-level abstractions in APIs. -@subsection odp_deprecated ODP DEPRECATED -A deprecated API will remain marked as such in the public API using #ODP_DEPRECATED for two release cycles for the #ODP_VERSION_API_MAJOR number. +@subsection odp_deprecate ODP DEPRECATE +A deprecated API will remain marked as such in the public API using #ODP_DEPRECATE() for two release cycles for the #ODP_VERSION_API_MAJOR number. For example an API marked as deprecated in 1.1.0 will still be present in 1.2.0 and removed in 1.3.0. A deprecated API will contain the doxygen tag \@deprecated with a description of the reason for the change. diff --git a/doc/platform-api-guide/Doxyfile b/doc/platform-api-guide/Doxyfile index fbe7c93..1f2d49a 100644 --- a/doc/platform-api-guide/Doxyfile +++ b/doc/platform-api-guide/Doxyfile @@ -17,4 +17,5 @@ PREDEFINED = __GNUC__ \ __LITTLE_ENDIAN_BITFIELD \ __x86_64__ \ ODP_PACKED \ + ODP_DEPRECATE(x)=x \ "ODP_HANDLE_T(type)=odp_handle_t type" diff --git a/doc/process-guide/release-guide.adoc b/doc/process-guide/release-guide.adoc index 8ea147a..595af91 100644 --- a/doc/process-guide/release-guide.adoc +++ b/doc/process-guide/release-guide.adoc @@ -251,7 +251,7 @@ Deleting or changing the published API follows the normal <>, * A deprecated indication is applied to the old API using the @deprecated doxygen syntax. * For a function change the old API it is additionally marked using the -ODP_DEPRECATED preprocessor macro. +ODP_DEPRECATE() preprocessor macro. * The CHANGELOG will have an entry in the API change section. * The Release Manager will resolve the duration for which the deprecated API. will be supported, and determine which future release it will be applied to. + @@ -275,7 +275,7 @@ The new API must have comparable coverage to the old API. * * @param name ... */ -odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED; +odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name); /** * Create a bar @@ -298,7 +298,7 @@ compiler warning. * * @param name ... */ -odp_foo_t odp_foo_create(const char *name) ODP_DEPRECATED; +odp_foo_t ODP_DEPRECATE(odp_foo_create)(const char *name); ---- === Changing a struct member diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore index 6702033..df9c87d 100644 --- a/include/odp/api/spec/.gitignore +++ b/include/odp/api/spec/.gitignore @@ -1 +1,2 @@ +deprecated.h version.h diff --git a/include/odp/api/spec/deprecated.h.in b/include/odp/api/spec/deprecated.h.in new file mode 100644 index 0000000..224f60f --- /dev/null +++ b/include/odp/api/spec/deprecated.h.in @@ -0,0 +1,50 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Macro for deprecated API definitions + */ + +#ifndef ODP_API_DEPRECATED_H_ +#define ODP_API_DEPRECATED_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Deprecated API definitions + * + * Some API definitions may be deprecated by this or a previous API version. + * This macro controls if those are enabled (and visible to the application) + * or disabled. + * + * * 0: Deprecated API definitions are disabled (default) + * * 1: Deprecated API definitions are enabled + */ +#define ODP_DEPRECATED_API @ODP_DEPRECATED_API@ + +/** + * @def ODP_DEPRECATE + * + * Macro to deprecate API definitions + */ + +#if ODP_DEPRECATED_API +#define ODP_DEPRECATE(x) x +#else +#define ODP_DEPRECATE(x) _deprecated_ ## x +#endif + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 73e5309..962415f 100644 --- a/include/odp_api.h +++ b/include/odp_api.h @@ -18,6 +18,7 @@ extern "C" { #endif +#include #include #include #include diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 874cf88..f282770 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -29,6 +29,7 @@ odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/cpumask.h \ $(top_srcdir)/include/odp/api/spec/crypto.h \ $(top_srcdir)/include/odp/api/spec/debug.h \ + $(top_srcdir)/include/odp/api/spec/deprecated.h \ $(top_srcdir)/include/odp/api/spec/errno.h \ $(top_srcdir)/include/odp/api/spec/event.h \ $(top_srcdir)/include/odp/api/spec/hash.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 70683ca..89c5e90 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -34,6 +34,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/cpumask.h \ $(srcdir)/include/odp/api/crypto.h \ $(srcdir)/include/odp/api/debug.h \ + $(srcdir)/include/odp/api/deprecated.h \ $(srcdir)/include/odp/api/errno.h \ $(srcdir)/include/odp/api/event.h \ $(srcdir)/include/odp/api/hash.h \ diff --git a/platform/linux-generic/include/odp/api/deprecated.h b/platform/linux-generic/include/odp/api/deprecated.h new file mode 100644 index 0000000..82797eb --- /dev/null +++ b/platform/linux-generic/include/odp/api/deprecated.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Control deprecated API definitions + */ + +#ifndef ODP_PLAT_DEPRECATED_H_ +#define ODP_PLAT_DEPRECATED_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef __cplusplus +} +#endif + +#endif