From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 3E3CB384B0C6; Wed, 26 Oct 2022 15:17:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E3CB384B0C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797444; bh=4oq2G8M/NAV79BQ1kvtShPZtIWe8FByneGXQvBrWwx8=; h=From:To:Subject:Date:From; b=nXBknC0bKGUADJe1E2OCEe0l/09RFKOFDxiCBSj0h/uc4nmptxaGrwOeyKpR6gSCu dqpHEtGZks9DkCGmEOXj3brrfyLx5N3wI9rokvDRvzXaUBjtBq71vq1A+dn6aVOKQF 0EvC0YFrCSSDvpf/h1kMjW7qsEUasLOACZ7eBOc0= 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: ebedf4cbaf2d2654c19be8095925ffe434c86997 X-Git-Newrev: 31785f711d757e2a5fdcce624711d94c0cf4bd91 Message-Id: <20221026151724.3E3CB384B0C6@sourceware.org> Date: Wed, 26 Oct 2022 15:17:14 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=31785f711d757e2a5fdcce624711d94c0cf4bd91 commit 31785f711d757e2a5fdcce624711d94c0cf4bd91 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 {