From patchwork Tue Jan 31 08:07:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 92950 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1816154qgi; Tue, 31 Jan 2017 00:11:46 -0800 (PST) X-Received: by 10.55.103.3 with SMTP id b3mr19521987qkc.248.1485850306273; Tue, 31 Jan 2017 00:11:46 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t184si11417304qkd.335.2017.01.31.00.11.46; Tue, 31 Jan 2017 00:11:46 -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 E8A5A60C48; Tue, 31 Jan 2017 08:11:45 +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_H3, 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 CA8A160CDE; Tue, 31 Jan 2017 08:08:19 +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 E56AA60C4E; Tue, 31 Jan 2017 08:07:55 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20123.outbound.protection.outlook.com [40.107.2.123]) by lists.linaro.org (Postfix) with ESMTPS id 639D560C07 for ; Tue, 31 Jan 2017 08:07:49 +0000 (UTC) Received: from AMXPR07CA0044.eurprd07.prod.outlook.com (10.242.64.44) by AM5PR0701MB2705.eurprd07.prod.outlook.com (10.173.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Tue, 31 Jan 2017 08:07:47 +0000 Received: from DB3FFO11FD022.protection.gbl (2a01:111:f400:7e04::117) by AMXPR07CA0044.outlook.office365.com (2a01:111:e400:1000::44) 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; Tue, 31 Jan 2017 08:07:47 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.36 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.36) by DB3FFO11FD022.mail.protection.outlook.com (10.47.217.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend Transport; Tue, 31 Jan 2017 08:07:47 +0000 Received: from fihe3nok1346.nsn-intra.net (10.158.36.134) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34; Tue, 31 Jan 2017 10:07:45 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Tue, 31 Jan 2017 10:07:45 +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 v0V87QkY032679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 31 Jan 2017 10:07:26 +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 v0V87Qat032638 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Tue, 31 Jan 2017 10:07:26 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Tue, 31 Jan 2017 10:07:26 +0200 Message-ID: <1485850046-28457-9-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1485850046-28457-1-git-send-email-petri.savolainen@linaro.org> References: <1485850046-28457-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.36; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39450400003)(39410400002)(39840400002)(39860400002)(39850400002)(2980300002)(199003)(189002)(36756003)(6916009)(92566002)(2950100002)(5003940100001)(48376002)(68736007)(50466002)(33646002)(22756006)(575784001)(86362001)(50226002)(8936002)(77096006)(2906002)(81156014)(38730400001)(81166006)(8676002)(450100001)(626004)(53936002)(356003)(110136003)(50986999)(76176999)(5660300001)(2351001)(189998001)(106466001)(105596002)(47776003)(305945005)(107886002)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0701MB2705; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD022; 1:rD358siQNK4tDKvB9HA/yel0hksWcR8Y/L8j+q9YMTxfFlWP8X/EE/2GLFXOfoyTlvhZlZr0g34cDW4mArBBG+xDdjKjSg8W+IUHcZVwAvfI8wQOdW2RNoFChyWuLoifGj7cRLv5ops+GVuJQ6yq0DuNATP+G60iElaOrYdT47Gizs8pz76mvHlgSGVijeZVltCfEZfpOZD2pahdmbHQh+CHKUPoM+PgrSuYxtWDPPUL2a3tHrltVlBO+P+mV04yK8+JQGTmRoUla2TUIB8MdnrmPabJByE1BzO8Nraz8vOs2XeUD6zpg+hsGf59R9t+vyqSWBCb9Wt4HsEq843NbMAyA6WZ57pjAieY+FdmLieRJI1J1bly7sN/+Q1/Scs1tjV/xco0eidGXnrzMgvGpkc7D7rvUPMY+gEvs+4HadStTFT6No5ERjcB5vLZX9WImfw+lEjCXQVAwkhTVRfCrw== X-MS-Office365-Filtering-Correlation-Id: 823e7c2c-8510-4e15-b74b-08d449b03e41 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AM5PR0701MB2705; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB2705; 3:dp4bDceORzFI6LRyVDIWOy3N9EpeXa8fjzd0sQc/tbWv/9WBplGJFCyB8wvnVdQmKI1/XVs3aATRgvkPv2+plAMBZRVsFVu4XEvD8MEAnHpvzQb6UHararpJnMKPyV8yDNcjgqArbZ06m//BpD1Lh3tOTRgZwaK6ahYW6xr2Ed0x0QGjBFFF5bafPyPHLoGh4KqsV8Y9zXMNInBKixlqgU68iTDh5f/Dzr09QRL5UqHHw3UJae1CgvJPKfN3T0HFzYIGTcf6iGPt4WbATXqvFxjIQcw/Ko+uyK+HfNmWAdhP/xTqSXeu6USEO23lDp8I9oTvCzKSxIzwRPBvv8NwyHASrhXHCEQ3XkaeEEquuzc=; 25:8Gn27SpHZwcZUDDLL0rEEADqV5s11EGNlQmDQ0QGcAteI3S9fMaQnoAGM1X+soWya6pv1FtGGSPk+nklrdpXOkLmOP6Pj/10vKRzfH0uRsa8CHXbtcnxML1XsXAjJl4grt9NM+QdfQ1EP2ZT/IBJR8rhcJP/ThMf0u3VnGqODt9GeskAd2AJmN+52UGrQqqgk1EEumc79NSy6cOoD0wqcS6BwcAl3p11tu+5hH64r5FVqBfw01Tjh3/RJLsay7XMKdLaBYeAnlgqOP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enVDs9tzc/sUHzxKI9qqqO2AZvEgEZCXIJAo9yrTG1e0P6ea+/sSRz2vxPiuLgVuWazOOvP+kBZv1GZICVG9y4wgAN5YmqJj/vEOpjAZDI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:AM5PR0701MB2705; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0701MB2705; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB2705; 4:+GIFTT2STMrWn1a+gWAGqvKafGlLRtPxnzwsykmbaacBvFxUu5GXACjbqj2u6akTJfCMGiwYjGHkXyF8Xv4TVmQ/VJXmnz25utKUpfNXWiIQjoauWMknRENsbWsJem601nQFfJmVR0MMpH03G1h67QZ6hNiMHuGWNlCtgV35EeQfMXtegl6tH9hOzgQsgrc4sM1k5naAwFVgTBgOnTQwN88m3IJZ/IsPeP/M2U/UAR0ILe0fwCXdYzalDJDSrqFHkipXwP36N6ZOP9jVm7QraiGApHKuMedzjUqw1iz8wmPYDX+ndyuKI+i6Vs2fmYsIXx4JoWZvDBI3aihL2faK6uPiYOihPdjPNWTI1z6WhQ5itKN++Ej7H4Z8XWPEviKrPVDZY1Z/rxnbFZvQqaWxDoBRzLzi8CN/tNIOv8Q61p1KO3/b+gFrvC2+nH1ognSD5gT9Q3uQwJyA2RaRWFSQEJjIv7XlKmRjiCL0H4mLJSFGs954t1VXcohtqVlEG/L6syWIHUq5M9lD1RFi5A5Pkvwi17ET6eXVse/JnhZk4yFIvb15H8ZB96Id8XV63FZJDrK1mKnex6R1JD0wWVPHb7mwoCdtjh6/hH+UfotalLMi3Ej+r3O97wigIOPdXUdp X-Forefront-PRVS: 0204F0BDE2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?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FPuljWsf7m81I1FMHuPFgIBRcmTqcd9THTv2PwpdgzARZWb0/BLh8Dnx7cxMURrRdMnidFi2xmLq8b7NtU49MkcF X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB2705; 6:29g69hFx+rYScnzXPij/LalZZ+1JXGCoYojcfS28sRkqxgBasDUlOLRnvDEIp75jkENnQq5LnoIRubYrA9hxHlvSCUZzBjLLmdo3hqDXqugwGenSkFNdCXne0YJ+2ubvuDDAB5IubblcH1p6G1T+ZcSAJFaA6E8TzT2surUxTMvcUOxKketRBjDwXYwszu4uPiEAR+3pKJ0MioDM5UgVuX1JjKP4i/N5rQgOAGDBwDI2MUkmm0gUSqW62+qRaqaJqP7NUKORd4TxgwWfv/eP84/g636sLIIEe+S9LA/Dblltn8X2sE7MP3PSQE0fpzWVvcQgY73P3VPsx2/VvIaZLQKZlGUwfxJQhJ0kfUJAZS2vgmab2IgCItcXSBwBFYundrvm4KI0OoY7qHmTuumpegxgXQNwAmqvNLMdwrk0rRQ=; 5:PBEt7Ybl3w2W+XDSDXAdIT8D++ubdO61u8efuuOL1umKupaeLtPgY7W6+k0l//3+IDiVqTrBHUKij4DemAV97u2r6w8QNNIHB2weiUDfIlDUXqf1EllsAOidnWTutzvHLB+dGPl80VcrHiuWJHfHCg==; 24:eOPDG7eKpqBKYAdPeiyg4VZbxqdJtSVx9V95FSST16GYsRG8sXb1rNEhK4SiSVz5usn3DBGdzQt5djEFOWYuzD+PHpagmcSS7s5YAHKGxgA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0701MB2705; 7:JDqOxcVeC59om+3evWYWo/ba/ZrTWttmqc80JKQSIPex4yv5sBef7T3OqU/BOBhJKdpxuMXI0Yn0Gdwxwhfkg7uGPFnx8Lwvq5U/aqXWt7gOCFETkCn7yhgY8SQiW4YWYHi0LkoEv/v8iCdHEA0+2t7t2ivOE/KT54q56pUePmd27NoW2BMKhyQJXAX69OecEAOVi9rrnwCLLGY6dBBXFTvi1nh6N2w5mUqw4CYev2CN9ExTqGedlT8h5yTT3zu7/F8ay4RXKa8KO0SrqbAEYugV7/9cgV5rPGkAwqnIEoJxTt2+NG4c47nEj2Kujc16FBf9DP5rKsPqRRZPxcQ6laNT0vcSS/i3+nooA16BHGmXWQ2LLOLy5PClA/rZiu5feOVUIronAUD4YWENUURfz7fBwx6SBTUYy1npFt7Ya0H80lVHGoyMNOpYBKAVKlnxhpWrYuLeH3fFmsxWZglSfr8Wabs0K0XNp46mwI3TxzHm7uLNLlyQ3GruTkyKZqQrETolAAonhcR9410lGtMUgg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2017 08:07:47.2556 (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.36]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0701MB2705 Subject: [lng-odp] [PATCH v4 8/8] abi: shm: added initial definitions 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" Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen --- .../arch/arm32-linux/odp/api/abi/shared_memory.h | 7 +++++ .../arch/arm64-linux/odp/api/abi/shared_memory.h | 7 +++++ include/odp/arch/default/api/abi/shared_memory.h | 35 ++++++++++++++++++++++ .../arch/mips64-linux/odp/api/abi/shared_memory.h | 7 +++++ .../arch/power64-linux/odp/api/abi/shared_memory.h | 7 +++++ .../arch/x86_32-linux/odp/api/abi/shared_memory.h | 7 +++++ .../arch/x86_64-linux/odp/api/abi/shared_memory.h | 7 +++++ platform/Makefile.inc | 6 ++-- .../include/odp/api/plat/shared_memory_types.h | 16 +++++----- platform/linux-generic/include/odp_pool_internal.h | 1 + platform/linux-generic/odp_shared_memory.c | 6 ++++ 11 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h create mode 100644 include/odp/arch/default/api/abi/shared_memory.h create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h create mode 100644 include/odp/arch/power64-linux/odp/api/abi/shared_memory.h create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h -- 2.8.1 diff --git a/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h b/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/arm32-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h b/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/arm64-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/include/odp/arch/default/api/abi/shared_memory.h b/include/odp/arch/default/api/abi/shared_memory.h new file mode 100644 index 0000000..5805f95 --- /dev/null +++ b/include/odp/arch/default/api/abi/shared_memory.h @@ -0,0 +1,35 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_ABI_SHM_H_ +#define ODP_ABI_SHM_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @internal Dummy type for strong typing */ +typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_shm_t; + +/** @ingroup odp_shared_memory + * @{ + */ + +typedef _odp_abi_shm_t *odp_shm_t; + +#define ODP_SHM_INVALID ((odp_shm_t)0) +#define ODP_SHM_NULL ODP_SHM_INVALID +#define ODP_SHM_NAME_LEN 32 + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h b/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/mips64-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h b/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/power64-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h b/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/x86_32-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h b/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h new file mode 100644 index 0000000..d203678 --- /dev/null +++ b/include/odp/arch/x86_64-linux/odp/api/abi/shared_memory.h @@ -0,0 +1,7 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 3201d33..7059d91 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -68,7 +68,8 @@ odpapiabidefaultinclude_HEADERS = \ $(top_srcdir)/include/odp/arch/default/api/abi/event.h \ $(top_srcdir)/include/odp/arch/default/api/abi/packet.h \ $(top_srcdir)/include/odp/arch/default/api/abi/pool.h \ - $(top_srcdir)/include/odp/arch/default/api/abi/queue.h + $(top_srcdir)/include/odp/arch/default/api/abi/queue.h \ + $(top_srcdir)/include/odp/arch/default/api/abi/shared_memory.h odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi odpapiabiarchinclude_HEADERS = \ @@ -78,7 +79,8 @@ odpapiabiarchinclude_HEADERS = \ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h \ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/packet.h \ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/pool.h \ - $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/queue.h + $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/queue.h \ + $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/shared_memory.h EXTRA_DIST = \ arch/arm/odp/api/cpu_arch.h \ diff --git a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h b/platform/linux-generic/include/odp/api/plat/shared_memory_types.h index afa0bf9..2c5b4ed 100644 --- a/platform/linux-generic/include/odp/api/plat/shared_memory_types.h +++ b/platform/linux-generic/include/odp/api/plat/shared_memory_types.h @@ -18,11 +18,15 @@ extern "C" { #endif +#include +#if ODP_ABI_COMPAT == 1 +#include +#else + #include #include -/** @addtogroup odp_shared_memory ODP SHARED MEMORY - * Operations on shared memory. +/** @ingroup odp_shared_memory * @{ */ @@ -33,16 +37,12 @@ typedef ODP_HANDLE_T(odp_shm_t); #define ODP_SHM_NAME_LEN 32 -/** Get printable format of odp_shm_t */ -static inline uint64_t odp_shm_to_u64(odp_shm_t hdl) -{ - return _odp_pri(hdl); -} - /** * @} */ +#endif + #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index b0805ac..ebb779d 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -24,6 +24,7 @@ extern "C" { #include #include #include +#include typedef struct pool_cache_t { uint32_t num; diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index ba32dee..a6faff6 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -8,6 +8,7 @@ #include #include #include +#include #include <_ishm_internal.h> #include @@ -112,3 +113,8 @@ void odp_shm_print_all(void) { _odp_ishm_status("Memory allocation status:"); } + +uint64_t odp_shm_to_u64(odp_shm_t hdl) +{ + return _odp_pri(hdl); +}