< prev index next >

src/share/vm/runtime/semaphore.hpp

Print this page

        

@@ -35,25 +35,26 @@
 # 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);
-  ~Semaphore();
+  Semaphore(uint value = 0) : _impl(value) {}
+  ~Semaphore() {}
 
-  void signal(uint count = 1);
+  void signal(uint count = 1) { _impl.signal(count); }
 
-  void wait();
+  void wait()                 { _impl.wait(); }
 };
 
 
 #endif // SHARE_VM_RUNTIME_SEMAPHORE_HPP
< prev index next >