FUtils/FUSemaphore.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2007 Feeling Software Inc.
00003     Portions of the code are:
00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
00005     
00006     MIT License: http://www.opensource.org/licenses/mit-license.php
00007 */
00008 
00014 #ifndef _FU_SEMAPHORE_H_
00015 #define _FU_SEMAPHORE_H_
00016 
00017 #ifdef __APPLE__
00018 #include <CoreServices/CoreServices.h>
00019 #endif
00020 
00028 class FCOLLADA_EXPORT FUSemaphore
00029 {
00030 private:
00031 #ifdef WIN32
00032     HANDLE semaphoreHandle; // WIN32
00033 #elif defined (__APPLE__)
00034     MPTaskID semaphoreHandle;
00035 #else
00036 #warning "FUSemaphore: Semaphore not implemented for non Windows"
00037 #endif
00038 
00039 public:
00043     FUSemaphore(uint32 initialValue, uint32 maximumValue);
00044 
00046     ~FUSemaphore();
00047 
00050     void Up();
00051 
00059     void Down();
00060 };
00061 
00067 class FCOLLADA_EXPORT FUBinarySemaphore : public FUSemaphore
00068 {
00069 public:
00070     FUBinarySemaphore() : FUSemaphore(0, 1) {}
00071 };
00072 
00073 #endif // _FU_SEMAPHORE_H_
00074 

Generated on Thu Feb 14 16:58:35 2008 for FCollada by  doxygen 1.4.6-NO