Mercurial > hg > truffle
diff src/share/vm/runtime/mutex.hpp @ 1878:fa83ab460c54
6988353: refactor contended sync subsystem
Summary: reduce complexity by factoring synchronizer.cpp
Reviewed-by: dholmes, never, coleenp
author | acorn |
---|---|
date | Fri, 22 Oct 2010 15:59:34 -0400 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/share/vm/runtime/mutex.hpp Mon Oct 18 09:33:24 2010 -0700 +++ b/src/share/vm/runtime/mutex.hpp Fri Oct 22 15:59:34 2010 -0400 @@ -265,48 +265,3 @@ } }; -/* - * Per-thread blocking support for JSR166. See the Java-level - * Documentation for rationale. Basically, park acts like wait, unpark - * like notify. - * - * 6271289 -- - * To avoid errors where an os thread expires but the JavaThread still - * exists, Parkers are immortal (type-stable) and are recycled across - * new threads. This parallels the ParkEvent implementation. - * Because park-unpark allow spurious wakeups it is harmless if an - * unpark call unparks a new thread using the old Parker reference. - * - * In the future we'll want to think about eliminating Parker and using - * ParkEvent instead. There's considerable duplication between the two - * services. - * - */ - -class Parker : public os::PlatformParker { -private: - volatile int _counter ; - Parker * FreeNext ; - JavaThread * AssociatedWith ; // Current association - -public: - Parker() : PlatformParker() { - _counter = 0 ; - FreeNext = NULL ; - AssociatedWith = NULL ; - } -protected: - ~Parker() { ShouldNotReachHere(); } -public: - // For simplicity of interface with Java, all forms of park (indefinite, - // relative, and absolute) are multiplexed into one call. - void park(bool isAbsolute, jlong time); - void unpark(); - - // Lifecycle operators - static Parker * Allocate (JavaThread * t) ; - static void Release (Parker * e) ; -private: - static Parker * volatile FreeList ; - static volatile int ListLock ; -};