[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] libs/store: make build without PTHREAD_STACK_MIN


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 28 Jan 2021 11:08:08 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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-SenderADCheck; bh=PkgjC5Lggw+0gXxldoq+6WzT3YSD1HXef58em5pItLg=; b=a2M+W+a2BRo2exm7Qo19M8sAlZ9lYMmqGXCijChUFgUU361gwtCXfP9pf4tpWJvXPVVc7kKreHRry4J4qigOReT+W0fwuust0mL48ve2CgC4pHSp0z3NPHUkOUG1iLc6hPI+LupU3L/4BDGYJnEfZIRk4ZqOtPso/CUMEjI5f6m2gB/jif+eFUPcjDVqcSVUE1ymt4VCnrMwrfp2rmohvvP9VHTls4zKyNfSPg2FavQQ4EmHrfxioOPCThJWDtazGkf9Awrt1AUDUYeWHlm7+rlFp1vcK3GhE2UyA0g2nCWQX1kvgVQL1WRxXYEgYxQMIFKoJQKtd6+hRgWNegwI+w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eTLZVBHBsboHVbMCyl9RYfk96t2oglt8KpS06LAO+7G+VEBbWS2ATtYimkj7rFpD5SvxozMrZsnXIXq46fl4wE4dEGgHqSZ7VrKlDwQx03su8jft8i52tQIPJ5/temJrWoBWNTDUgf8y1Eg5BvzxihvScBVt4NydyO/26EToB5QPdgM6lkOrwCQLjsPv23qD+WZpfJIwax1mNTwvVD2rFohGTT/xGiElC+OcABhbfXlntBmEaFOI1m4bKxZLeS5AXxfhIXZ1Tp3xIDbLP6gh2I60qKyaAKpwfshjbtkuR5zVcaTmWi/Nggm4pKtoz4Z8uxWSzcG8AVIjIgqwHetJrQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, "Wei Liu" <wl@xxxxxxx>
  • Delivery-date: Thu, 28 Jan 2021 11:08:23 +0000
  • Ironport-sdr: 4xEUHXBOvlsjCvG9Z47BQgzASQC7ryGsDWyjoOl9h4JLAuz2rDv6RTDTCduqhhObBiVotTKC5k yhCz6Y/q9iL2+mj42DFakkahXm7x7ZolbOINAzYT60OIiEYs3XUaz3ha1GpnLNlwlewzx9v24e Xxp9BakuP0lrDCsfQIVgX45xGN8kS0Txljy1ngy5eTat6FuZaJVeC+lvxpSDSBfFZUVmjQiXwD a6Xsl4FkbfmdFcILvKrhxK9SbjyAl75gBOw3qAIFZVFYzEGOrRw4jU5g/tbzntLJBO7Fy/3I4Q 908=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28/01/2021 10:57, Roger Pau Monné wrote:
> On Tue, Jan 26, 2021 at 11:47:59PM +0100, Manuel Bouyer wrote:
>> On NetBSD, PTHREAD_STACK_MIN is not available.
>> If PTHREAD_STACK_MIN is not defined, define it to 0 so that we fallback to
>> DEFAULT_THREAD_STACKSIZE
>>
> I would add:
>
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
>> Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>
>> ---
>>  tools/libs/store/xs.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c
>> index 4ac73ec317..b6ecbd787e 100644
>> --- a/tools/libs/store/xs.c
>> +++ b/tools/libs/store/xs.c
>> @@ -811,6 +811,11 @@ bool xs_watch(struct xs_handle *h, const char *path, 
>> const char *token)
>>  
>>  #ifdef USE_PTHREAD
>>  #define DEFAULT_THREAD_STACKSIZE (16 * 1024)
>> +/* NetBSD doesn't have PTHREAD_STACK_MIN. */
>> +#ifndef PTHREAD_STACK_MIN
>> +# define PTHREAD_STACK_MIN 0
>> +#endif
>> +
>>  #define READ_THREAD_STACKSIZE                                       \
>>      ((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ?       \
>>      PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE)
> There was also a suggestion to use MAX(PTHREAD_STACK_MIN,
> DEFAULT_THREAD_STACKSIZE). Is maybe MAX not defied here?

TBH, I was planning to submit an incremental cleanup doing this
separately.  It would be cleaner than putting cleanup into the "fix
NetBSD" patch.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.