1*fce4895dSRene Gollent /* 2*fce4895dSRene Gollent * Copyright 2013, Rene Gollent, rene@gollent.com. 3*fce4895dSRene Gollent * Distributed under the terms of the MIT License. 4*fce4895dSRene Gollent */ 5*fce4895dSRene Gollent #ifndef SEMAPHORE_INFO_H 6*fce4895dSRene Gollent #define SEMAPHORE_INFO_H 7*fce4895dSRene Gollent 8*fce4895dSRene Gollent #include <OS.h> 9*fce4895dSRene Gollent #include <String.h> 10*fce4895dSRene Gollent 11*fce4895dSRene Gollent #include "Types.h" 12*fce4895dSRene Gollent 13*fce4895dSRene Gollent 14*fce4895dSRene Gollent class SemaphoreInfo { 15*fce4895dSRene Gollent public: 16*fce4895dSRene Gollent SemaphoreInfo(); 17*fce4895dSRene Gollent SemaphoreInfo(const SemaphoreInfo& other); 18*fce4895dSRene Gollent SemaphoreInfo(team_id team, sem_id semaphore, 19*fce4895dSRene Gollent const BString& name, int32 count, 20*fce4895dSRene Gollent thread_id latestHolder); 21*fce4895dSRene Gollent 22*fce4895dSRene Gollent void SetTo(team_id team, sem_id semaphore, 23*fce4895dSRene Gollent const BString& name, int32 count, 24*fce4895dSRene Gollent thread_id latestHolder); 25*fce4895dSRene Gollent TeamID()26*fce4895dSRene Gollent team_id TeamID() const { return fTeam; } SemID()27*fce4895dSRene Gollent area_id SemID() const { return fSemaphore; } Name()28*fce4895dSRene Gollent const BString& Name() const { return fName; } 29*fce4895dSRene Gollent Count()30*fce4895dSRene Gollent int32 Count() const { return fCount; } LatestHolder()31*fce4895dSRene Gollent thread_id LatestHolder() const 32*fce4895dSRene Gollent { return fLatestHolder; } 33*fce4895dSRene Gollent private: 34*fce4895dSRene Gollent team_id fTeam; 35*fce4895dSRene Gollent sem_id fSemaphore; 36*fce4895dSRene Gollent BString fName; 37*fce4895dSRene Gollent int32 fCount; 38*fce4895dSRene Gollent thread_id fLatestHolder; 39*fce4895dSRene Gollent }; 40*fce4895dSRene Gollent 41*fce4895dSRene Gollent 42*fce4895dSRene Gollent #endif // AREA_INFO_H 43