Mercurial > hg > truffle
comparison src/os/linux/vm/os_linux.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | bb9356ec5967 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2013, 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 // Linux_OS defines the interface to Linux operating systems | 28 // Linux_OS defines the interface to Linux operating systems |
29 | 29 |
30 /* pthread_getattr_np comes with LinuxThreads-0.9-7 on RedHat 7.1 */ | 30 /* pthread_getattr_np comes with LinuxThreads-0.9-7 on RedHat 7.1 */ |
31 typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *); | 31 typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *); |
32 | |
33 // Information about the protection of the page at address '0' on this os. | |
34 static bool zero_page_read_protected() { return true; } | |
35 | 32 |
36 class Linux { | 33 class Linux { |
37 friend class os; | 34 friend class os; |
38 friend class TestReserveMemorySpecial; | 35 friend class TestReserveMemorySpecial; |
39 | 36 |
203 // Real-time clock functions | 200 // Real-time clock functions |
204 static void clock_init(void); | 201 static void clock_init(void); |
205 | 202 |
206 // fast POSIX clocks support | 203 // fast POSIX clocks support |
207 static void fast_thread_clock_init(void); | 204 static void fast_thread_clock_init(void); |
205 | |
206 static inline bool supports_monotonic_clock() { | |
207 return _clock_gettime != NULL; | |
208 } | |
208 | 209 |
209 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { | 210 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { |
210 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; | 211 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; |
211 } | 212 } |
212 | 213 |