< prev index next >

src/share/vm/runtime/semaphore.hpp

Print this page

        

*** 35,59 **** # include "semaphore_windows.hpp" #else # error "No semaphore implementation provided for this OS" #endif class Semaphore : public CHeapObj<mtInternal> { private: // Prevent copying and assignment of Semaphore instances. Semaphore(const Semaphore&); Semaphore& operator=(const Semaphore&); protected: SemaphoreImpl _impl; public: ! Semaphore(uint value = 0); ! ~Semaphore(); ! void signal(uint count = 1); ! void wait(); }; #endif // SHARE_VM_RUNTIME_SEMAPHORE_HPP --- 35,60 ---- # include "semaphore_windows.hpp" #else # error "No semaphore implementation provided for this OS" #endif + // Implements the limited, platform independent Semaphore API. class Semaphore : public CHeapObj<mtInternal> { private: // Prevent copying and assignment of Semaphore instances. Semaphore(const Semaphore&); Semaphore& operator=(const Semaphore&); protected: SemaphoreImpl _impl; public: ! Semaphore(uint value = 0) : _impl(value) {} ! ~Semaphore() {} ! void signal(uint count = 1) { _impl.signal(count); } ! void wait() { _impl.wait(); } }; #endif // SHARE_VM_RUNTIME_SEMAPHORE_HPP
< prev index next >