Mercurial > hg > graal-compiler
comparison src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp @ 4961:0368109684cb
7132070: Use a mach_port_t as the OSThread thread_id rather than pthread_t on BSD/OSX
Summary: Change OSThread to use mach thread_t
Reviewed-by: phh, dcubed
author | sla |
---|---|
date | Sun, 19 Feb 2012 13:11:39 +0100 |
parents | f08d439fab8c |
children | 960a442eae91 |
comparison
equal
deleted
inserted
replaced
4960:86ce3208eb18 | 4961:0368109684cb |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
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 | |
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) \ | 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) \ |
33 \ | 39 \ |
34 /******************************/ \ | 40 /******************************/ \ |
35 /* Threads (NOTE: incomplete) */ \ | 41 /* Threads (NOTE: incomplete) */ \ |
36 /******************************/ \ | 42 /******************************/ \ |
37 nonstatic_field(OSThread, _thread_id, pthread_t) \ | 43 nonstatic_field(OSThread, _thread_id, OS_THREAD_ID_TYPE) \ |
38 nonstatic_field(OSThread, _pthread_id, pthread_t) \ | 44 nonstatic_field(OSThread, _pthread_id, pthread_t) \ |
39 /* This must be the last entry, and must be present */ \ | 45 /* This must be the last entry, and must be present */ \ |
40 last_entry() | 46 last_entry() |
41 | 47 |
42 | 48 |
44 \ | 50 \ |
45 /**********************/ \ | 51 /**********************/ \ |
46 /* Posix Thread IDs */ \ | 52 /* Posix Thread IDs */ \ |
47 /**********************/ \ | 53 /**********************/ \ |
48 \ | 54 \ |
49 declare_integer_type(pid_t) \ | 55 declare_unsigned_integer_type(thread_t) \ |
50 declare_unsigned_integer_type(pthread_t) \ | 56 declare_unsigned_integer_type(pthread_t) \ |
51 \ | 57 \ |
52 /* This must be the last entry, and must be present */ \ | 58 /* This must be the last entry, and must be present */ \ |
53 last_entry() | 59 last_entry() |
54 | 60 |