1 /* |
1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2015, 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. |
250 #error define gettid for the arch |
250 #error define gettid for the arch |
251 #endif |
251 #endif |
252 #endif |
252 #endif |
253 |
253 |
254 // Cpu architecture string |
254 // Cpu architecture string |
255 #if defined(ZERO) |
255 static char cpu_arch[] = HOTSPOT_LIB_ARCH; |
256 static char cpu_arch[] = ZERO_LIBARCH; |
|
257 #elif defined(IA64) |
|
258 static char cpu_arch[] = "ia64"; |
|
259 #elif defined(IA32) |
|
260 static char cpu_arch[] = "i386"; |
|
261 #elif defined(AMD64) |
|
262 static char cpu_arch[] = "amd64"; |
|
263 #elif defined(ARM) |
|
264 static char cpu_arch[] = "arm"; |
|
265 #elif defined(PPC32) |
|
266 static char cpu_arch[] = "ppc"; |
|
267 #elif defined(PPC64) |
|
268 static char cpu_arch[] = "ppc64"; |
|
269 #elif defined(SPARC) |
|
270 # ifdef _LP64 |
|
271 static char cpu_arch[] = "sparcv9"; |
|
272 # else |
|
273 static char cpu_arch[] = "sparc"; |
|
274 # endif |
|
275 #else |
|
276 #error Add appropriate cpu_arch setting |
|
277 #endif |
|
278 |
|
279 |
256 |
280 // pid_t gettid() |
257 // pid_t gettid() |
281 // |
258 // |
282 // Returns the kernel thread id of the currently running thread. Kernel |
259 // Returns the kernel thread id of the currently running thread. Kernel |
283 // thread id is used to access /proc. |
260 // thread id is used to access /proc. |