haiku/headers/private/debugger/model/SemaphoreInfo.h
Rene Gollent fce4895d18 Debugger: Split into core library and application.
- Add subfolder src/kits/debugger which contains the debugger's core
  functionality and lower layers. Correspondingly add headers/private/debugger
  for shared headers to be used by clients such as the Debugger application
  and eventual remote_debug_server. Adjust various files to account for
  differences as a result of the split and moves.
- Add libdebugger.so to minimal Jamfile.
2016-06-04 13:18:39 -04:00

43 lines
1004 B
C++

/*
* Copyright 2013, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef SEMAPHORE_INFO_H
#define SEMAPHORE_INFO_H
#include <OS.h>
#include <String.h>
#include "Types.h"
class SemaphoreInfo {
public:
SemaphoreInfo();
SemaphoreInfo(const SemaphoreInfo& other);
SemaphoreInfo(team_id team, sem_id semaphore,
const BString& name, int32 count,
thread_id latestHolder);
void SetTo(team_id team, sem_id semaphore,
const BString& name, int32 count,
thread_id latestHolder);
team_id TeamID() const { return fTeam; }
area_id SemID() const { return fSemaphore; }
const BString& Name() const { return fName; }
int32 Count() const { return fCount; }
thread_id LatestHolder() const
{ return fLatestHolder; }
private:
team_id fTeam;
sem_id fSemaphore;
BString fName;
int32 fCount;
thread_id fLatestHolder;
};
#endif // AREA_INFO_H