Skip to content

Commit 68eac8a

Browse files
alarixniagrooverdan
authored andcommitted
my_thread: Use unsigned long long for storing pthread IDs
This is a fix for operating systems that have pthread_t defined as a pointer and use the default pthread_self() mechanism for identifying threads. More specifically, this is a build fix for NetBSD. Any changes I submit are freely available under the new BSD license. Signed-off-by: Nia Alarie <[email protected]>
1 parent 139333a commit 68eac8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/perfschema/my_thread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
typedef pthread_key_t thread_local_key_t;
1818
typedef pthread_t my_thread_handle;
1919
typedef pthread_attr_t my_thread_attr_t;
20-
typedef uint32 my_thread_os_id_t;
20+
typedef unsigned long long my_thread_os_id_t;
2121

2222
#define LOCK_plugin_delete LOCK_plugin
2323

@@ -73,7 +73,7 @@ static inline my_thread_os_id_t my_thread_os_id()
7373
#else
7474
#ifdef HAVE_INTEGER_PTHREAD_SELF
7575
/* Unknown platform, fallback. */
76-
return pthread_self();
76+
return (unsigned long long)pthread_self();
7777
#else
7878
/* Feature not available. */
7979
return 0;

0 commit comments

Comments
 (0)