From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 62DE54C9F for ; Wed, 28 Feb 2018 05:17:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 20:17:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="23784144" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 27 Feb 2018 20:17:31 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 20:17:31 -0800 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.243]) by fmsmsx123.amr.corp.intel.com ([169.254.7.215]) with mapi id 14.03.0319.002; Tue, 27 Feb 2018 20:17:31 -0800 From: "Wiles, Keith" To: "Burakov, Anatoly" CC: "dev@dpdk.org" , "Tan, Jianfeng" Thread-Topic: [dpdk-dev] [PATCH v3 3/5] eal: use locks to determine if secondary process is active Thread-Index: AQHTr9h1a5WqVgEkAECLZ2efsZi8EKO5vIKA Date: Wed, 28 Feb 2018 04:17:30 +0000 Message-ID: References: <31f6d9ef676fb1eb0a664c06d62d66f32876dcb6.1519672713.git.anatoly.burakov@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.67.99] Content-Type: text/plain; charset="utf-8" Content-ID: <9DFC1DF453465344BCC7328A4ACC82FE@intel.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 3/5] eal: use locks to determine if secondary process is active X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 04:17:34 -0000 DQoNCj4gT24gRmViIDI3LCAyMDE4LCBhdCA4OjM1IEFNLCBBbmF0b2x5IEJ1cmFrb3YgPGFuYXRv bHkuYnVyYWtvdkBpbnRlbC5jb20+IHdyb3RlOg0KPiANCj4gUHJldmlvdXNseSwgSVBDIHdvdWxk IHJlbW92ZSBzb2NrZXRzIGl0IGNvbnNpZGVycyB0byBiZSAiaW5hY3RpdmUiDQo+IGJhc2VkIG9u IHdoZXRoZXIgdGhleSBoYXZlIHJlc3BvbmRlZC4gQ2hhbmdlIHRoaXMgdG8gY3JlYXRlIGxvY2sN Cj4gZmlsZXMgaW4gYWRkaXRpb24gdG8gc29ja2V0IGZpbGVzLCBzbyB0aGF0IHdlIGNhbiBkZXRl cm1pbmUgaWYNCj4gc2Vjb25kYXJ5IHByb2Nlc3MgaXMgYWN0aXZlIGJlZm9yZSBhdHRlbXB0aW5n IHRvIGNvbW11bmljYXRlIHdpdGgNCj4gaXQuIFRoYXQgd2F5LCB3ZSBjYW4gZGlzdGluZ3Vpc2gg c2Vjb25kYXJpZXMgdGhhdCBhcmUgYWxpdmUgYnV0DQo+IGFyZSBub3QgcmVzcG9uZGluZywgZnJv bSB0aG9zZSB0aGF0IGhhdmUgYWxyZWFkeSBkaWVkLg0KPiANCj4gU2lnbmVkLW9mZi1ieTogQW5h dG9seSBCdXJha292IDxhbmF0b2x5LmJ1cmFrb3ZAaW50ZWwuY29tPg0KPiAtLS0NCj4gDQo+IE5v dGVzOg0KPiAgICB2Mzogbm8gY2hhbmdlcw0KPiANCj4gICAgdjI6IG5vIGNoYW5nZXMNCj4gDQo+ IGxpYi9saWJydGVfZWFsL2NvbW1vbi9lYWxfY29tbW9uX3Byb2MuYyB8IDIwNCArKysrKysrKysr KysrKysrKysrKys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