Mercurial > hg > graal-jvmci-8
comparison src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp @ 6093:960a442eae91
7161732: Improve handling of thread_id in OSThread
Reviewed-by: dholmes, kamg
author | rbackman |
---|---|
date | Tue, 22 May 2012 10:11:53 +0200 |
parents | 0368109684cb |
children | 91bf7da5c609 |
comparison
equal
deleted
inserted
replaced
6082:4b37c0dafe3a | 6093:960a442eae91 |
---|---|
27 | 27 |
28 // These are the OS and CPU-specific fields, types and integer | 28 // These are the OS and CPU-specific fields, types and integer |
29 // constants required by the Serviceability Agent. This file is | 29 // constants required by the Serviceability Agent. This file is |
30 // referenced by vmStructs.cpp. | 30 // referenced by vmStructs.cpp. |
31 | 31 |
32 #ifdef __APPLE__ | |
33 #define OS_THREAD_ID_TYPE thread_t | |
34 #else | |
35 #define OS_THREAD_ID_TYPE pthread_t | |
36 #endif | |
37 | |
38 #define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ | 32 #define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ |
39 \ | 33 \ |
40 /******************************/ \ | 34 /******************************/ \ |
41 /* Threads (NOTE: incomplete) */ \ | 35 /* Threads (NOTE: incomplete) */ \ |
42 /******************************/ \ | 36 /******************************/ \ |
43 nonstatic_field(OSThread, _thread_id, OS_THREAD_ID_TYPE) \ | 37 nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ |
44 nonstatic_field(OSThread, _pthread_id, pthread_t) \ | 38 nonstatic_field(OSThread, _pthread_id, pthread_t) \ |
45 /* This must be the last entry, and must be present */ \ | 39 /* This must be the last entry, and must be present */ \ |
46 last_entry() | 40 last_entry() |
47 | 41 |
48 | 42 |
50 \ | 44 \ |
51 /**********************/ \ | 45 /**********************/ \ |
52 /* Posix Thread IDs */ \ | 46 /* Posix Thread IDs */ \ |
53 /**********************/ \ | 47 /**********************/ \ |
54 \ | 48 \ |
55 declare_unsigned_integer_type(thread_t) \ | 49 declare_unsigned_integer_type(OSThread::thread_id_t) \ |
56 declare_unsigned_integer_type(pthread_t) \ | 50 declare_unsigned_integer_type(pthread_t) \ |
57 \ | 51 \ |
58 /* This must be the last entry, and must be present */ \ | 52 /* This must be the last entry, and must be present */ \ |
59 last_entry() | 53 last_entry() |
60 | 54 |