< prev index next >

src/hotspot/os/bsd/semaphore_bsd.hpp

Print this page




  36 
  37 class OSXSemaphore : public CHeapObj<mtInternal>{
  38   semaphore_t _semaphore;
  39 
  40   // Prevent copying and assignment.
  41   OSXSemaphore(const OSXSemaphore&);
  42   OSXSemaphore& operator=(const OSXSemaphore&);
  43 
  44  public:
  45   OSXSemaphore(uint value = 0);
  46   ~OSXSemaphore();
  47 
  48   void signal(uint count = 1);
  49 
  50   void wait();
  51 
  52   bool trywait();
  53   bool timedwait(unsigned int sec, int nsec);
  54 
  55  private:
  56   static jlong currenttime();
  57 };
  58 
  59 typedef OSXSemaphore SemaphoreImpl;
  60 
  61 #endif // __APPLE__
  62 
  63 #endif // OS_BSD_VM_SEMAPHORE_BSD_HPP


  36 
  37 class OSXSemaphore : public CHeapObj<mtInternal>{
  38   semaphore_t _semaphore;
  39 
  40   // Prevent copying and assignment.
  41   OSXSemaphore(const OSXSemaphore&);
  42   OSXSemaphore& operator=(const OSXSemaphore&);
  43 
  44  public:
  45   OSXSemaphore(uint value = 0);
  46   ~OSXSemaphore();
  47 
  48   void signal(uint count = 1);
  49 
  50   void wait();
  51 
  52   bool trywait();
  53   bool timedwait(unsigned int sec, int nsec);
  54 
  55  private:
  56   static int64_t currenttime();
  57 };
  58 
  59 typedef OSXSemaphore SemaphoreImpl;
  60 
  61 #endif // __APPLE__
  62 
  63 #endif // OS_BSD_VM_SEMAPHORE_BSD_HPP
< prev index next >