//FTTSemaphore - [2020-04-13 11:57:47]
#ifndef _FTTSEMAPHORE_H_
#define _FTTSEMAPHORE_H_

#include <semaphore.h>
#include "FTTMutex.h"

/*
0026D3C4 FTTSemaphore::FTTSemaphore(int,int,char const*,EFTTProtocol)
0026D402 FTTSemaphore::~FTTSemaphore()
0026D420 FTTSemaphore::WaitSema(int)
0026D48A FTTSemaphore::SignalSema(int)
0026D4B4 FTTSemaphore::GetSemaCount()

FTTSemaphore::FTTSemaphore((int)(a1 + 5), 0, 255, (int)"CFTTFile_AsyncQueue", 0);
*/

class FTTSemaphore {
public:
  FTTSemaphore(int a1, int a2,
               const char* pSemName,
               EFTTProtocol eProtocol = EFTTProtocol_0);  //0026D3C4
  ~FTTSemaphore();                                        //0026D402
  int WaitSema(int a2);                                   //0026D420
  void SignalSema(int a2);                                //0026D48A
  int GetSemaCount();                                     //0026D4B4

  sem_t sem_t_0;
  FTTMutex* m_pmutex_4;
  int sema_count_8;
  int field_C;
  char name[32];
};

#endif  //_FTTSEMAPHORE_H_