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

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


  • To: Manuel Bouyer <bouyer@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 28 Jan 2021 11:57:21 +0100
  • 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=3wmWty2HyvgYw0/n5W92Q4hsgybxFbBWNus9AiiqNB8=; b=UYNcrqmHUIx1npYR9S3nqHtauwfKNiJnAPYIBh3vg6c/kg7UOSH2YrryZ/rYbDI4nediy+1dDio35CNS/nJTdYFjG0y+RYm3rY88VNXUSNSkGfwuh9EDuxVI4CoEsGkJsvR2b8bqjFEtX+Naap+iwFyFs52R/0P64WC2oTqvBK+Fqg81muBI3UZSg2EE1QRVbOnondZlsAC60bqJthOz1P9WWqee5u5ST+BYQrhQDckpjFZDUsrB4PALrHFQEr5Rw56B0oicJqB5mKBfUOIHYbi8sNbI7h6Npb0y5f+FABNJkZYEayNFS/tPh//fnrQFMd2PqlOFZkCeOWfr7+tVWA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KrRItQnxHmprfZwsSg82E3NIcd9CsU+LxqnM0wqzztg8huj9BySACXoIHn7pTaw/5OibzqhNBqV4yiyukXu0QIxSYT1ebUbq3cblUcxCcmiw0vm2SuZ8MMpWueaQpU8MZgZ37jx0J6o6boY7Q2zS6eLk5oeiBdsgYKm7ST+GNbZqmHeyAGAKjVi5pVTiEKuxwzpR6hXWN9Dc0uQIeZKCTt2lb7bH1X/nJ4QWszp2dQO5edr2pRttVlm0LWGsd4CFmv1hpCQF9+NyXkQY0iA6yKScjcZ2QCoqvKuDaV+zydmmI94xtWWiSkvyUPRyPH3jLAvSY0DhJx9c/wmH7+FQ+Q==
  • Authentication-results: esa2.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 10:57:40 +0000
  • Ironport-sdr: YvYKXkQGRvo9kld6yi43dzsEzdadvpz+veSa0gRaj1m0TxqBvwk5ZtzzzfVcRNgrDcmsGJBu9E Ep4v149R/4WtdrTynK/TuXGhvX92emB3dsAaVnhawmEVNiBUxZe82on2I2HfeozeVYNw71O9IF t9Ycv1CV56iVbyvaQn0W55aSOmOLyQg57Ft1l0SIRH/aOTTdnNoZYrA3HaeQa3XfPMbevFwO6M RGP9+kC/UMNQIgCVq4gNQRQPCUIj7WSaqianjZfLPGg1ROgR/kjDnScZ/0oc2r2aP1qTrltTfX 3lo=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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?

Thanks, Roger.



 


Rackspace

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