From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 7F8563852C4D; Wed, 23 Nov 2022 14:45:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F8563852C4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214748; bh=OcMriWnVzugYs/ZJUSKM8QssrDygi4DxNe4UhS8FTls=; h=From:To:Subject:Date:From; b=c9K3Xxyh+EnulN3Yr3dLwfKb8ueiq5UGsirP855vBg87cDf9xyGaOa7sFLmnltr2P IA1hoLpzy9Wa0xnV+kJhUlv9/en2ePO+ID6J7MopMRnO4jb/Qw/D3Y++uldFiThdFi gEz/N81/wyiZPwFKdW5nvs/ahwK2QM7d4yMihzmE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: nptl: fix thread ID types for capabilities X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 7cbc4d39feaf6ec88ffe83a8524191c98925b955 X-Git-Newrev: 5042604a1eba1f411796d47a85b70e778e32f4d1 Message-Id: <20221123144548.7F8563852C4D@sourceware.org> Date: Wed, 23 Nov 2022 14:45:48 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5042604a1eba1f411796d47a85b70e778e32f4d1 commit 5042604a1eba1f411796d47a85b70e778e32f4d1 Author: Szabolcs Nagy Date: Wed Jul 13 11:06:49 2022 +0100 cheri: nptl: fix thread ID types for capabilities Diff: --- sysdeps/nptl/bits/pthreadtypes.h | 4 ++++ sysdeps/nptl/bits/thread-shared-types.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sysdeps/nptl/bits/pthreadtypes.h b/sysdeps/nptl/bits/pthreadtypes.h index 6f8907fe54..706c2bb495 100644 --- a/sysdeps/nptl/bits/pthreadtypes.h +++ b/sysdeps/nptl/bits/pthreadtypes.h @@ -24,7 +24,11 @@ /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ +#ifdef __CHERI_PURE_CAPABILITY__ +typedef __uintcap_t pthread_t; +#else typedef unsigned long int pthread_t; +#endif /* Data structures for mutex handling. The structure of the attribute diff --git a/sysdeps/nptl/bits/thread-shared-types.h b/sysdeps/nptl/bits/thread-shared-types.h index 5653507e55..1efdf4b0ef 100644 --- a/sysdeps/nptl/bits/thread-shared-types.h +++ b/sysdeps/nptl/bits/thread-shared-types.h @@ -103,7 +103,11 @@ struct __pthread_cond_s }; typedef unsigned int __tss_t; +#ifdef __CHERI_PURE_CAPABILITY__ +typedef __uintcap_t __thrd_t; +#else typedef unsigned long int __thrd_t; +#endif typedef struct {