From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BAFCA00C2; Fri, 4 Feb 2022 20:11:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F3824013F; Fri, 4 Feb 2022 20:11:20 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id D8A0940041 for ; Fri, 4 Feb 2022 20:11:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644001879; x=1675537879; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=XiiyEa3EQhs1uSdqDOlBSl7NyadFeu2Q9pVg5shDQGs=; b=aaZ1R1QR7wUMDpM8zV+rhZu8um0IJGe7wEbz3icC0EOcLQ/cAWtUnXzN TeRNy1Dq0YAuC3sLgntFSA73HmIE06Vx4K0kwwdd9tLB/BbJ7ddeGbC61 eHb4e67bgH2GRkv9x1pNk168X3YxmtfQVEt5kX8LGt5vLiCYtug2YF5Bb bFKrQ4qcv2m6Paqfz4HlGCIUADNVaIVVkIRfEzWB54yO4IkaP+yTzgktm M1/D426OOwxb5446tREOOF6BkZ1G6wSAkngm+hcz4f4mJRP07wIybUrXj WFVgU5AaTU6xzcsL32JF+UTPUdHfy7IHSrwiCLeMygzUQMv2cFBwSBYsB Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10248"; a="334822888" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="334822888" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 11:11:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="566830030" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2022 11:11:17 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 4 Feb 2022 11:11:16 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 4 Feb 2022 11:11:16 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Fri, 4 Feb 2022 11:11:16 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 4 Feb 2022 11:11:15 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mUuUQWSsDSgT3Jh2ANId9Oa4QDzVrd8uQi2m87XWXiXEZKQu62Ky42MA9Mbw7btnv2EL4s3fyo+YkeoRNvlSVGINGILoO6S53SK6JPKCAMMME1Ja2eGxX23/LN0mrzkHzGuVcduHbQgtdPTuF+sZo85TISVebQKzEr4Q7Ry0cHf9b6e6eJ5DyHTbqobtwoGIgn5ZUotuSkS9jEKecJR66cXSU4ITF3WHeSJ1c53X1CxRC6r6BML/EpzkF6AF3gzb++qKJq24YmNyEaCVZZmHwEGrz4QtO6l1fx8qQOZDGiEJ2bgS4QMKUBZ8CUVV7UFTxhEFzvhTHt8YRMzpZJwOLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rzgjJapU4zsx/rMiVDx81nQFk8lr4En1sdqzt5I824U=; b=JR/aHGjcAfOVryxMBdRwEQvkIEX+k7g7OxZyZnxUpG2csQvlIiNNtx0BZCAawmhSXbuzOl/BDT4BJuju/Skmv72wtl2GYI6dz34d6LcqhmZDt67dgtufT73WvuLR/nBUtrZfZc8DVtgeljsJRU6KGFSblGMS3gzTlySUFfTB1NED/3cI9LhfAzKMYhmHufOZijBgpL/TLhkdWAw2C86Jad3O42pkJp6zlaXVeVU/QvYKvmF1HTEV3EDLY0Dcs9Ebi+o93dya637wy1Ek1rH+6cr0LmVkv6ZL6ELwhFoM2jY+SbPm6jtwZWWMRkVOM6RhKvtDLww1WvSDt7g0Yexe7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB4675.namprd11.prod.outlook.com (2603:10b6:5:2ac::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 4 Feb 2022 19:11:13 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07%4]) with mapi id 15.20.4951.012; Fri, 4 Feb 2022 19:11:13 +0000 From: "Ananyev, Konstantin" To: "navasile@linux.microsoft.com" CC: "Richardson, Bruce" , "david.marchand@redhat.com" , "dev@dpdk.org" , "dmitry.kozliuk@gmail.com" , "dmitrym@microsoft.com" , "khot@microsoft.com" , "navasile@microsoft.com" , "ocardona@microsoft.com" , "Kadam, Pallavi" , "roretzla@microsoft.com" , "talshn@nvidia.com" , "thomas@monjalon.net" Subject: Re: [PATCH v18 1/8] eal: add basic threading functions Thread-Topic: Re: [PATCH v18 1/8] eal: add basic threading functions Thread-Index: AdgZ+aOwREA8jggnRP6rj/XNPiVLfA== Date: Fri, 4 Feb 2022 19:11:13 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 17d6df14-7a70-43c6-3f74-08d9e8121c7d x-ms-traffictypediagnostic: DM6PR11MB4675:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1107; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3iv9h6Wji58kq+EPhJMpQsee2samhY+JcKZN+r7MRvE4q7PtkAhyYLMK3uotQPgAzCP0R6oCKaFVJVcgVJS2pgRxQY8CSdn/NuIqC9g55E7qxQf0MQAnprZIwOjsLlyLig7NF+u8TF+AcXQjIsKojP1rSwrtBrRehoRWznF6KYSyGgK01NsCgd7w5Zo7P6zko36reXTRdK+aV3p76kNXdNzLClkkcPl7+xNRWJgk2I4AkAFBZulqgUfmBNsJ2BRg0ZZhoSv4N2BtCNtTzTZRlZ13QXI0qTtnZu6/0jqqOgO2R8EMzLo/+ShmCZXHXOPHhwSWIiuBDeXKmhXbZX7RM2VmBPxEM9bdpXQjLo95V/TKRP72inMlXWqu1TABSqJslhdzVgxA/gVZTRZwarUuQx+q5CnH4F8fr/T2au/TQEYOpopag1YpKRCUSH/xU//X+Cyl2DF7krpLOHKdD8kwTiEJnwW4vCIbDB2hOaQmHbqVsk48WHv0Rq/bycJS/o63w2z6loRx+ur26nPhEc9jjf7UZq3SFfOUPo2JjIPfmyioNL5W8iqtMCkdTLj5sSdBK2nVOKdjvw9Z+s22OaB0mwbVec2S0VHwvDlYzDi99sSzoUvyHBrGIhGtTjr34CRmPb40KFiopOxcqH7fFpdZqBnQfWRc6BJWayE8Ph9CdOzoFG1DvoyzkEkre290jdFyGdXzGqNpzvq9jEpkBlpzlg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38100700002)(45080400002)(54906003)(83380400001)(508600001)(9686003)(6506007)(71200400001)(33656002)(26005)(186003)(55016003)(86362001)(4326008)(66556008)(122000001)(7696005)(76116006)(82960400001)(8936002)(64756008)(66446008)(66946007)(8676002)(66476007)(38070700005)(2906002)(316002)(7416002)(5660300002)(6916009)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cD0ApyK/5aoHD46m1XycZM1xY2SnhhcmXrqOguWDD2S9K7BL7IyOmHtRiBPH?= =?us-ascii?Q?a6BmaPNPRYHUPAZfnsDnhhoPCi6dwrzJcx4dEUc1U/3ZWgtlT5C3pK+56iHL?= =?us-ascii?Q?7ABf9MqWKz6qonGnCsoo6YMtnLIsMpQUR+eMJFAxDfgoYK5jsRpHF+Zue6ro?= =?us-ascii?Q?fulEzh0AdbjdRW1BxNu0EFDjxT7N/Np29JolmgXhPrYiT/e/iv8gDjqOX0EL?= =?us-ascii?Q?lOC8zcsEPYCjIfG1I8NOBSfvH9rT/WIUKC9EimD+wSUuurFfEca/nWhVrHkR?= =?us-ascii?Q?vOYgIlp5P840GYDqye9d+GeTmCyboJ0euR8X3TKzmOvRu61UII68lkGKY5Jt?= =?us-ascii?Q?kGJTkIE5d04idHawKT9Lt2qDvnEHo3eR2SVnb/sznROMDd+sscCNcmQrNUPY?= =?us-ascii?Q?OIh1sPULCeKhlA1Ra+CW4fTQ95JYiHd/UZyt4Gm9LFLDCl+9vdbDXXtWQRG+?= =?us-ascii?Q?M/Nwp5vJXZmEkAaLwu+iC0/rXvPSVvBPk7WkzL58KuiTFbDB8YABMmQbpAJL?= =?us-ascii?Q?Y6ZFzdStbVT++u2Qb3mg6Rik8ZxfCu7MXXMia1cGl1kayEbAcRXJr3J5/MfA?= =?us-ascii?Q?zQWi76HiKr26+yX55t56FDEwQ4st+tuwTOTUUVW7ldy8uQQECjhYwaqlbVdm?= =?us-ascii?Q?gIy/xuEGmEWjDEQFbY6G/L8Vulj1ubxKLu0jLROwXAz8hgDLP1Rmo7S+mVPk?= =?us-ascii?Q?WXaaKwbYTKyDDMXVKz6D8fcvjnYeddMgE6qbyWwk2tj0YhpTeLxvZ1ABQnI1?= =?us-ascii?Q?45l5Nyltjvz1StapdZ+w6HrpcAfjfMxANYJrYeM33EHznUhtSj8NNcucn8yk?= =?us-ascii?Q?3rjnkTX8LOTafgWSGLZYGC8t0kQBHysctSW/F1O3qUhuzqeOIE/IXKxtXOlL?= =?us-ascii?Q?mhacsmC8ZA6Us7tsI2zsoMP7PVxxW4cepD7MWOKT7NzURZegbh+xGCp2+BaK?= =?us-ascii?Q?DgfV7MD1Y8s92fmTqXdwYlPZ5OXutGB+Bugdxp1cI0shKB1NjS28sIURhDKi?= =?us-ascii?Q?NvmTN+PjwMDm+UC61exuuFN7szPZ+yZTZOwNF45+0aBCHwLx36IelAzwFSYq?= =?us-ascii?Q?4kMeyaNRlQ4LP0S9v5XG4CcubfNSlzcjlGxXvyd6rg9MzXn4TU9IiS3I+8vD?= =?us-ascii?Q?PXwcSZFcjCmrTVIRTBqRHUQgEaOM/u/38gFD4C/CeysmzMFh0NE0m1dj2Mn1?= =?us-ascii?Q?pb4qyeaYLDaz8lSgbD6EvrOG4rqnGLDxi+mpIKbc3SNZ6kCKKowOmxOVYnT1?= =?us-ascii?Q?X5ZetHTKQMqiCiyykuZ9rFR2/2DjoZ/t1yaGqDJp84m3KJYOpwqFjk1WZ79L?= =?us-ascii?Q?ojXO/UsxYYxvPJR6AIDypa/foHEanHNim6sImHdi9kkIGDPxYyhPMietPNT1?= =?us-ascii?Q?72OtnDEEn94+B3gtD6WEDMhr0CrHbhr48oZhm/MD4t2DL1LWwJq4OA4qO7bB?= =?us-ascii?Q?DW1h/EXDLIaoLqor2U6kzv6SbiheKCK7bcot4ceP6IN4iTxSK0UL8qKiFq7s?= =?us-ascii?Q?WLOXHNqa8f2/i/GZ3M3i44JerZ1aLVv4l3IWSMDJwnhMYXVRCHEYLr66dgSe?= =?us-ascii?Q?Qn37TGSs6vBqENm2oyS6fqx0vr6cV1ANV++f2M6Donp5kqhKmcwhnASI8vL7?= =?us-ascii?Q?tjfQOMiXtvJBwPadqiijc7g8ORIah0d90fFU4whWnb239pJ6g3/gcesA7GLS?= =?us-ascii?Q?IrRnkQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17d6df14-7a70-43c6-3f74-08d9e8121c7d X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2022 19:11:13.3567 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: u70eKZIkLAAdnnha56Gq9qYp03vLtPSA1vLVaR4ionakl9Gy4+u6Z7ISxw8rjTPv2FjK6tEfJ6zPclI7zxvBc/DW1WobGcBR9Q+60L2QgNY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4675 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > Use a portable, type-safe representation for the thread identifier. > Add functions for comparing thread ids and obtaining the thread id > for the current thread. >=20 > Signed-off-by: Narcisa Vasile > --- > lib/eal/common/meson.build | 1 + > lib/eal/{unix =3D> common}/rte_thread.c | 57 ++++++++++++++++---------- > lib/eal/include/rte_thread.h | 53 ++++++++++++++++++------ > lib/eal/unix/meson.build | 1 - > lib/eal/version.map | 3 ++ > lib/eal/windows/rte_thread.c | 58 +++++++++++++++++---------- > 6 files changed, 117 insertions(+), 56 deletions(-) > rename lib/eal/{unix =3D> common}/rte_thread.c (66%) >=20 > diff --git a/lib/eal/common/meson.build b/lib/eal/common/meson.build > index 917758cc65..6bdc9cd854 100644 > --- a/lib/eal/common/meson.build > +++ b/lib/eal/common/meson.build > @@ -52,5 +52,6 @@ if not is_windows > 'hotplug_mp.c', > 'malloc_mp.c', > 'rte_keepalive.c', > + 'rte_thread.c' > ) > endif > diff --git a/lib/eal/unix/rte_thread.c b/lib/eal/common/rte_thread.c > similarity index 66% > rename from lib/eal/unix/rte_thread.c > rename to lib/eal/common/rte_thread.c > index c72d619ec1..92a7451b0a 100644 > --- a/lib/eal/unix/rte_thread.c > +++ b/lib/eal/common/rte_thread.c > @@ -1,5 +1,6 @@ > /* SPDX-License-Identifier: BSD-3-Clause > * Copyright 2021 Mellanox Technologies, Ltd > + * Copyright(c) 2021 Microsoft Corporation > */ >=20 > #include > @@ -16,25 +17,41 @@ struct eal_tls_key { > pthread_key_t thread_index; > }; >=20 > +rte_thread_t > +rte_thread_self(void) > +{ > + rte_thread_t thread_id; > + > + thread_id.opaque_id =3D (uintptr_t)pthread_self(); > + > + return thread_id; > +} > + > +int > +rte_thread_equal(rte_thread_t t1, rte_thread_t t2) > +{ > + return pthread_equal((pthread_t)t1.opaque_id, (pthread_t)t2.opaque_id); > +} > + > int > rte_thread_key_create(rte_thread_key *key, void (*destructor)(void *)) > { > int err; > + rte_thread_key k; I know that 'rte_thread_key' wasn't introduced in this patchset, but wonder - why not 'rte_thread_key_t' as we do for other DPDK typedefs? =20 > - *key =3D malloc(sizeof(**key)); > - if ((*key) =3D=3D NULL) { > + k =3D malloc(sizeof(*k)); > + if (k =3D=3D NULL) { > RTE_LOG(DEBUG, EAL, "Cannot allocate TLS key.\n"); > - rte_errno =3D ENOMEM; > - return -1; > + return EINVAL; > } > - err =3D pthread_key_create(&((*key)->thread_index), destructor); > - if (err) { > + err =3D pthread_key_create(&(k->thread_index), destructor); > + if (err !=3D 0) { > RTE_LOG(DEBUG, EAL, "pthread_key_create failed: %s\n", > strerror(err)); > - free(*key); > - rte_errno =3D ENOEXEC; > - return -1; > + free(k); > + return err; > } > + *key =3D k; > return 0; > } >=20 > @@ -43,18 +60,16 @@ rte_thread_key_delete(rte_thread_key key) > { > int err; >=20 > - if (!key) { > + if (key =3D=3D NULL) { > RTE_LOG(DEBUG, EAL, "Invalid TLS key.\n"); > - rte_errno =3D EINVAL; > - return -1; > + return EINVAL; > } > err =3D pthread_key_delete(key->thread_index); > - if (err) { > + if (err !=3D 0) { > RTE_LOG(DEBUG, EAL, "pthread_key_delete failed: %s\n", > strerror(err)); > free(key); > - rte_errno =3D ENOEXEC; > - return -1; > + return err; > } > free(key); > return 0; > @@ -65,17 +80,15 @@ rte_thread_value_set(rte_thread_key key, const void *= value) > { > int err; >=20 > - if (!key) { > + if (key =3D=3D NULL) { > RTE_LOG(DEBUG, EAL, "Invalid TLS key.\n"); > - rte_errno =3D EINVAL; > - return -1; > + return EINVAL; > } > err =3D pthread_setspecific(key->thread_index, value); > - if (err) { > + if (err !=3D 0) { > RTE_LOG(DEBUG, EAL, "pthread_setspecific failed: %s\n", > strerror(err)); > - rte_errno =3D ENOEXEC; > - return -1; > + return err; > } > return 0; > } > @@ -83,7 +96,7 @@ rte_thread_value_set(rte_thread_key key, const void *va= lue) > void * > rte_thread_value_get(rte_thread_key key) > { > - if (!key) { > + if (key =3D=3D NULL) { > RTE_LOG(DEBUG, EAL, "Invalid TLS key.\n"); > rte_errno =3D EINVAL; > return NULL; > diff --git a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h > index 8be8ed8f36..c9cdeb07aa 100644 > --- a/lib/eal/include/rte_thread.h > +++ b/lib/eal/include/rte_thread.h > @@ -1,6 +1,8 @@ > /* SPDX-License-Identifier: BSD-3-Clause > * Copyright(c) 2021 Mellanox Technologies, Ltd > + * Copyright(c) 2021 Microsoft Corporation > */ > +#include Do we really need it in common .h? I don't see anything sched.h that we start to use with that patch. > #include > #include > @@ -20,11 +22,45 @@ > extern "C" { > #endif >=20 > +#include > + > +/** > + * Thread id descriptor. > + */ > +typedef struct rte_thread_tag { > + uintptr_t opaque_id; /**< thread identifier */ > +} rte_thread_t; > + > /** > * TLS key type, an opaque pointer. > */ > typedef struct eal_tls_key *rte_thread_key; >=20 > +/** > + * Get the id of the calling thread. > + * > + * @return > + * Return the thread id of the calling thread. > + */ > +__rte_experimental > +rte_thread_t rte_thread_self(void); > + > +/** > + * Check if 2 thread ids are equal. > + * > + * @param t1 > + * First thread id. > + * > + * @param t2 > + * Second thread id. > + * > + * @return > + * If the ids are equal, return nonzero. > + * Otherwise, return 0. > + */ > +__rte_experimental > +int rte_thread_equal(rte_thread_t t1, rte_thread_t t2); > + > #ifdef RTE_HAS_CPUSET >=20 > /** > @@ -63,9 +99,7 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp); > * > * @return > * On success, zero. > - * On failure, a negative number and an error number is set in rte_err= no. > - * rte_errno can be: ENOMEM - Memory allocation error. > - * ENOEXEC - Specific OS error. > + * On failure, return a positive errno-style error number. > */ >=20 > __rte_experimental > @@ -80,9 +114,7 @@ int rte_thread_key_create(rte_thread_key *key, > * > * @return > * On success, zero. > - * On failure, a negative number and an error number is set in rte_err= no. > - * rte_errno can be: EINVAL - Invalid parameter passed. > - * ENOEXEC - Specific OS error. > + * On failure, return a positive errno-style error number. > */ > __rte_experimental > int rte_thread_key_delete(rte_thread_key key); > @@ -97,9 +129,7 @@ int rte_thread_key_delete(rte_thread_key key); > * > * @return > * On success, zero. > - * On failure, a negative number and an error number is set in rte_err= no. > - * rte_errno can be: EINVAL - Invalid parameter passed. > - * ENOEXEC - Specific OS error. > + * On failure, return a positive errno-style error number. > */ > __rte_experimental > int rte_thread_value_set(rte_thread_key key, const void *value); > @@ -112,9 +142,8 @@ int rte_thread_value_set(rte_thread_key key, const vo= id *value); > * > * @return > * On success, value data pointer (can also be NULL). > - * On failure, NULL and an error number is set in rte_errno. > - * rte_errno can be: EINVAL - Invalid parameter passed. > - * ENOEXEC - Specific OS error. > + * On failure, NULL and a positive error number is set in rte_errno. > + * > */ > __rte_experimental > void *rte_thread_value_get(rte_thread_key key); > diff --git a/lib/eal/unix/meson.build b/lib/eal/unix/meson.build > index e3ecd3e956..cb6d233721 100644 > --- a/lib/eal/unix/meson.build > +++ b/lib/eal/unix/meson.build > @@ -6,5 +6,4 @@ sources +=3D files( > 'eal_unix_memory.c', > 'eal_unix_timer.c', > 'eal_firmware.c', > - 'rte_thread.c', > )