From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 8C23D3858000; Fri, 1 Sep 2023 10:49:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C23D3858000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693565397; bh=4LoEB7Sy4dwqDoulMe1ktPD6ozBo5n/ODWZIVRHzYQA=; h=From:To:Subject:Date:From; b=CB7raDBXTLpnnkxqTmWQsohTxc8UCQ9xuWUWF0helrMP+3ZnzaBpt8sui5jcQGsPr 7W7nSWSmDqGv0HBFFwUEBgKK6+q+coOiNV9SwcSHUdb314YDB9GsBAw2kzOHZ7FBMe 4TOZrfj6EF3gRqzSddCnHTcY7nhCvJEs7FDKYwSg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_4-branch] Cygwin: sys/cpuset.h: use internal base types X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/cygwin-3_4-branch X-Git-Oldrev: 797d1bbd2e115872df10cf1c15ccc6cfc99648d6 X-Git-Newrev: 6fbbb95e0d07f47512bafde9adf933b22835d1df Message-Id: <20230901104957.8C23D3858000@sourceware.org> Date: Fri, 1 Sep 2023 10:49:57 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D6fbbb95e0d0= 7f47512bafde9adf933b22835d1df commit 6fbbb95e0d07f47512bafde9adf933b22835d1df Author: Corinna Vinschen AuthorDate: Wed Aug 30 21:11:42 2023 +0200 Commit: Corinna Vinschen CommitDate: Fri Sep 1 12:43:36 2023 +0200 Cygwin: sys/cpuset.h: use internal base types =20 Use __size_t and __pid_t instead of size_t and pid_t to avoid further dependencies to external headers. =20 Reported-by: Brian Inglis Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/include/sys/cpuset.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys= /cpuset.h index 2ab2b95f0d65..a5a8fa81ef3d 100644 --- a/winsup/cygwin/include/sys/cpuset.h +++ b/winsup/cygwin/include/sys/cpuset.h @@ -29,15 +29,15 @@ typedef struct } cpu_set_t; =20 #if __GNU_VISIBLE -int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *); +int __sched_getaffinity_sys (__pid_t, __size_t, cpu_set_t *); =20 /* These macros alloc or free dynamically-sized cpu sets of size 'num' cpu= s. Allocations are padded such that full-word operations can be done easil= y. */ #define CPU_ALLOC_SIZE(num) __cpuset_alloc_size (num) -static __inline size_t +static __inline __size_t __cpuset_alloc_size (int num) { - return (size_t) (((num + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_m= ask)); + return (__size_t) (((num + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu= _mask)); } =20 #define CPU_ALLOC(num) __cpuset_alloc (num) @@ -49,7 +49,7 @@ void __cpuset_free (cpu_set_t *); /* These _S macros operate on dynamically-sized cpu sets of size 'siz' byt= es */ #define CPU_ZERO_S(siz, set) __cpuset_zero_s (siz, set) static __inline -__cpuset_zero_s (size_t siz, cpu_set_t *set) +__cpuset_zero_s (__size_t siz, cpu_set_t *set) { #if __GNUC_PREREQ (2, 91) __builtin_memset (set, 0, siz); @@ -62,7 +62,7 @@ __cpuset_zero_s (size_t siz, cpu_set_t *set) =20 #define CPU_SET_S(cpu, siz, set) __cpuset_set_s (cpu, siz, set) static __inline void -__cpuset_set_s (int cpu, size_t siz, cpu_set_t *set) +__cpuset_set_s (int cpu, __size_t siz, cpu_set_t *set) { if (cpu >=3D 0 && cpu < 8 * siz) (set)->__bits[__CPUELT(cpu)] |=3D __CPUMASK(cpu); @@ -70,7 +70,7 @@ __cpuset_set_s (int cpu, size_t siz, cpu_set_t *set) =20 #define CPU_CLR_S(cpu, siz, set) __cpuset_clr_s (cpu, siz, set) static __inline void -__cpuset_clr_s (int cpu, size_t siz, cpu_set_t *set) +__cpuset_clr_s (int cpu, __size_t siz, cpu_set_t *set) { if (cpu >=3D 0 && cpu < 8 * siz) (set)->__bits[__CPUELT(cpu)] &=3D ~(__CPUMASK(cpu)); @@ -78,7 +78,7 @@ __cpuset_clr_s (int cpu, size_t siz, cpu_set_t *set) =20 #define CPU_ISSET_S(cpu, siz, set) __cpuset_isset_s (cpu, siz, set) static __inline int -__cpuset_isset_s (int cpu, size_t siz, cpu_set_t *set) +__cpuset_isset_s (int cpu, __size_t siz, cpu_set_t *set) { int res =3D 0; if (cpu >=3D 0 && cpu < 8 * siz) @@ -88,7 +88,7 @@ __cpuset_isset_s (int cpu, size_t siz, cpu_set_t *set) =20 #define CPU_COUNT_S(siz, set) __cpuset_count_s (siz, set) static __inline int -__cpuset_count_s (size_t siz, cpu_set_t *set) +__cpuset_count_s (__size_t siz, cpu_set_t *set) { int i, res =3D 0; for (i =3D 0; i < siz / sizeof (__cpu_mask); i++) @@ -98,7 +98,7 @@ __cpuset_count_s (size_t siz, cpu_set_t *set) =20 #define CPU_AND_S(siz, dst, src1, src2) __cpuset_and_s (siz, dst, src1, sr= c2) static __inline void -__cpuset_and_s (size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *sr= c2) +__cpuset_and_s (__size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *= src2) { int i; for (i =3D 0; i < siz / sizeof (__cpu_mask); i++) @@ -107,7 +107,7 @@ __cpuset_and_s (size_t siz, cpu_set_t *dst, cpu_set_t *= src1, cpu_set_t *src2) =20 #define CPU_OR_S(siz, dst, src1, src2) __cpuset_or_s (siz, dst, src1, src2) static __inline void -__cpuset_or_s (size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *src= 2) +__cpuset_or_s (__size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *s= rc2) { int i; for (i =3D 0; i < siz / sizeof (__cpu_mask); i++) @@ -116,7 +116,7 @@ __cpuset_or_s (size_t siz, cpu_set_t *dst, cpu_set_t *s= rc1, cpu_set_t *src2) =20 #define CPU_XOR_S(siz, dst, src1, src2) __cpuset_xor_s (siz, dst, src1, sr= c2) static __inline void -__cpuset_xor_s (size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *sr= c2) +__cpuset_xor_s (__size_t siz, cpu_set_t *dst, cpu_set_t *src1, cpu_set_t *= src2) { int i; for (i =3D 0; i < siz / sizeof (__cpu_mask); i++) @@ -125,7 +125,7 @@ __cpuset_xor_s (size_t siz, cpu_set_t *dst, cpu_set_t *= src1, cpu_set_t *src2) =20 #define CPU_EQUAL_S(siz, src1, src2) __cpuset_equal_s (siz, src1, src2) static __inline int -__cpuset_equal_s (size_t siz, cpu_set_t *src1, cpu_set_t *src2) +__cpuset_equal_s (__size_t siz, cpu_set_t *src1, cpu_set_t *src2) { int i, res =3D 1; for (i =3D 0; res && i < siz / sizeof (__cpu_mask); i++)