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

Re: [PATCH] include/types: move stdlib.h-kind types to common header


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 12 Jan 2023 14:22:23 +0000
  • Accept-language: en-GB, en-US
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+h3UbKkuU1lIVjdRVZZQkGmzfqawdmEoIuAEuNNsHCw=; b=I7XdOH/8c1qMCOptpC0csoqO+qc8xt33lYtpTXAjdE3WbCi8M3apokpxL1X5wK4231L/Jz5okiw7r4d0L7nDRIgjGo1TdWKhsTggiP/upD/GbARMMl+L70/IZnW8ZOs5H45uJaR+eyKudYenX1Wb1mOIzDZR6kuq4R7GZF19X1YqVUCo1N2Bqk+LKbFP2Z7cEC6yDs/wUNogiMHMiETwxVk9BPJhEr44ZTeizGrXpwer5YHVui1DYos2sriLq/4BP38bLzh9wCLRCyOuNKqApL+ErbF0IHxje0Ns1PeuqdhduK6W+pBbmSHOcPktwiZ9CProu0TNqnmxELCiX9QRTw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTixSmmIGw9N/+iRhqPXbYL9s3wA/X/SLaqA3G5XkDyWz4FPR9lfCmWUlGp+L+eH/Trcc5pRfF/sAhtHvNYhN2iPxYZudq/0whopjALnJLUBUmcPVQy5GZ/7ONcU6GhKpbyXAdBKTUpse5YWSl0I7jhaPoeg/bHyBV+jDoO0bSz8GkpeS3lt4FnQwCM54gV7hXrg9F1bLbLuZXXhS2kau3j0Zc5rRYQZwCaUDXbuds35CJIap1C9usrASKBMf8kZVHZ9ho37rPsHxEodYNVQpO3EKKe1mNrY3Dl8KCQFIeKAD7Jbh4rSu6qUC8/2Nu37gu0nHtgVu7TOgELmvf42qA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 14:22:40 +0000
  • Ironport-data: A9a23:JWO30KLfGe5VUum/FE+RUJQlxSXFcZb7ZxGr2PjKsXjdYENS0GAOy WQWC2iHOq2IMWGnL9t3OYvg/U5Tvp/XyoBhHgVlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHv+kUrWs1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPcwP9TlK6q4mhA5wVkPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5UIE538 eUVdAkcSSyhp+m0+vWLdspF05FLwMnDZOvzu1lG5BSBV7MdZ8mGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/dopTSOpOBy+OGF3N79U9qGX8hK2G2fo XrL5T/RCRAGLt2PjzGC9xpAg8eex3imBtpJTdVU8NY2g0CLm3ADNiQRalKfhKGWyUjudNlQf hl8Fi0G6PJaGFaQZtv3UgC8oXWElgUBQNcWGOo/gCmdx6yR7wuHC2wsSj9adMdgpMIwXSYt1 FKCg5XuHzMHmL+ITXOQ8J+EoDX0PjIaRUcZfjMNRwYB59jloakwgwjJQ9IlF7S65vXqHRngz jbMqzIx750ZgNQXzay98RbCiii1u5nSZgcv40PcWWfNxh1+YImpdom582/R5PxLLJuaZlSZt X1CkM+bhN3iFrmInS2JBf4LRbeg4q7fNCWG2QIyWZ486z6q5nivO5hK5y1zL1toNcBCfiL1Z EjUukVa45o70GaWUJKbqrmZU6wCpZUM3/y4PhwIRrKiuqRMSTI=
  • Ironport-hdrordr: A9a23:DdH29KEoWAgCTQocpLqE0seALOsnbusQ8zAXPhZKOHtom6uj5q OTdZUgtSMc5wx7ZJhNo7q90cq7IE80l6Qb3WBLB8bHYOCOggLBEGgF1+bfKlbbdREWmNQw6U /OGZIObuEZoTJB/KTHCKjTKadE/OW6
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZJo5jBKk6QTlSGEGpBgNCxgedxK6a1XaA
  • Thread-topic: [PATCH] include/types: move stdlib.h-kind types to common header

On 12/01/2023 2:01 pm, Jan Beulich wrote:
> size_t, ssize_t, and ptrdiff_t are all expected to be uniformly defined
> on any ports Xen might gain. In particular I hope new ports can rely on
> __SIZE_TYPE__ and __PTRDIFF_TYPE__ being made available by the compiler.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thankyou for starting this.

> ---
> This is just to start with some hopefully uncontroversial low hanging fruit.

However, I'd advocate going one step further and making real a
xen/stddef.h header to match our existing stdboot and stdarg, now that
we have fully divorced ourselves from the compiler-provided freestanding
headers.

This way, the type are declared in the usual place in a C environment.

I was then also going to use this approach to start breaking up
xen/lib.h which is a dumping ground of far too much stuff.  In
particular, when we have a stddef.h, I think it is entirely reasonable
to move things like ARRAY_SIZE/count_args()/etc into it, because they
are entirely standard in the Xen codebase.

~Andrew

 


Rackspace

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