comparison src/os/linux/vm/os_linux.inline.hpp @ 9212:216dce75d5ac

Merge.
author Christian Humer <christian.humer@gmail.com>
date Mon, 08 Apr 2013 17:02:55 +0200
parents 63e54c37ac64
children f2110083203d
comparison
equal deleted inserted replaced
9211:77c17c97f713 9212:216dce75d5ac
23 */ 23 */
24 24
25 #ifndef OS_LINUX_VM_OS_LINUX_INLINE_HPP 25 #ifndef OS_LINUX_VM_OS_LINUX_INLINE_HPP
26 #define OS_LINUX_VM_OS_LINUX_INLINE_HPP 26 #define OS_LINUX_VM_OS_LINUX_INLINE_HPP
27 27
28 #include "runtime/atomic.hpp"
29 #include "runtime/atomic.inline.hpp" 28 #include "runtime/atomic.inline.hpp"
30 #include "runtime/os.hpp" 29 #include "runtime/os.hpp"
31 30
32 #ifdef TARGET_OS_ARCH_linux_x86 31 #ifdef TARGET_OS_ARCH_linux_x86
33 # include "orderAccess_linux_x86.inline.hpp" 32 # include "orderAccess_linux_x86.inline.hpp"
286 285
287 inline int os::set_sock_opt(int fd, int level, int optname, 286 inline int os::set_sock_opt(int fd, int level, int optname,
288 const char* optval, socklen_t optlen) { 287 const char* optval, socklen_t optlen) {
289 return ::setsockopt(fd, level, optname, optval, optlen); 288 return ::setsockopt(fd, level, optname, optval, optlen);
290 } 289 }
290
291 inline void os::Linux::SuspendResume::set_suspended() {
292 jint temp, temp2;
293 do {
294 temp = _state;
295 temp2 = Atomic::cmpxchg(temp | SR_SUSPENDED, &_state, temp);
296 } while (temp2 != temp);
297 }
298
299 inline void os::Linux::SuspendResume::clear_suspended() {
300 jint temp, temp2;
301 do {
302 temp = _state;
303 temp2 = Atomic::cmpxchg(temp & ~SR_SUSPENDED, &_state, temp);
304 } while (temp2 != temp);
305 }
306
291 #endif // OS_LINUX_VM_OS_LINUX_INLINE_HPP 307 #endif // OS_LINUX_VM_OS_LINUX_INLINE_HPP