From 0d33462664c10e70035df95cb26728fea287fec5 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Fri, 5 Jul 2019 23:25:51 +0200 Subject: [PATCH] Use uintptr_t rather than uintmax_t for thread ids On 32-bit machines uintmax_t is likely to be slower than uintptr_t, and for that reason, using an uintmax_t for a thread id seems highly unlikely. For the current platforms, uintptr_t works. Signed-off-by: Erik Boasson --- src/ddsrt/include/dds/ddsrt/threads/posix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ddsrt/include/dds/ddsrt/threads/posix.h b/src/ddsrt/include/dds/ddsrt/threads/posix.h index 0d15c27..19b4ed0 100644 --- a/src/ddsrt/include/dds/ddsrt/threads/posix.h +++ b/src/ddsrt/include/dds/ddsrt/threads/posix.h @@ -49,7 +49,7 @@ typedef TASK_ID ddsrt_tid_t; # endif /* __VXWORKS__ */ #else -typedef uintmax_t ddsrt_tid_t; +typedef uintptr_t ddsrt_tid_t; #define PRIdTID PRIuPTR #endif