1dcbc00c3SRene Gollent/*
2dcbc00c3SRene Gollent * Copyright 2013, Rene Gollent, rene@gollent.com.
3dcbc00c3SRene Gollent * Distributed under the terms of the MIT License.
4dcbc00c3SRene Gollent */
5dcbc00c3SRene Gollent
6dcbc00c3SRene Gollent
7dcbc00c3SRene Gollent#include "SemaphoreInfo.h"
8dcbc00c3SRene Gollent
9dcbc00c3SRene Gollent
10dcbc00c3SRene GollentSemaphoreInfo::SemaphoreInfo()
11dcbc00c3SRene Gollent	:
12dcbc00c3SRene Gollent	fTeam(-1),
13dcbc00c3SRene Gollent	fSemaphore(-1),
14dcbc00c3SRene Gollent	fName(),
15dcbc00c3SRene Gollent	fCount(0),
16dcbc00c3SRene Gollent	fLatestHolder(-1)
17dcbc00c3SRene Gollent{
18dcbc00c3SRene Gollent}
19dcbc00c3SRene Gollent
20dcbc00c3SRene Gollent
21dcbc00c3SRene GollentSemaphoreInfo::SemaphoreInfo(const SemaphoreInfo &other)
22dcbc00c3SRene Gollent	:
23dcbc00c3SRene Gollent	fTeam(other.fTeam),
24dcbc00c3SRene Gollent	fSemaphore(other.fSemaphore),
25dcbc00c3SRene Gollent	fName(other.fName),
26dcbc00c3SRene Gollent	fCount(other.fCount),
27dcbc00c3SRene Gollent	fLatestHolder(other.fLatestHolder)
28dcbc00c3SRene Gollent{
29dcbc00c3SRene Gollent}
30dcbc00c3SRene Gollent
31dcbc00c3SRene Gollent
32dcbc00c3SRene GollentSemaphoreInfo::SemaphoreInfo(team_id team, sem_id semaphore,
33dcbc00c3SRene Gollent	const BString& name, int32 count, thread_id latestHolder)
34dcbc00c3SRene Gollent	:
35dcbc00c3SRene Gollent	fTeam(team),
36dcbc00c3SRene Gollent	fSemaphore(semaphore),
37dcbc00c3SRene Gollent	fName(name),
38dcbc00c3SRene Gollent	fCount(count),
39dcbc00c3SRene Gollent	fLatestHolder(latestHolder)
40dcbc00c3SRene Gollent{
41dcbc00c3SRene Gollent}
42dcbc00c3SRene Gollent
43dcbc00c3SRene Gollent
44dcbc00c3SRene Gollentvoid
45dcbc00c3SRene GollentSemaphoreInfo::SetTo(team_id team, sem_id semaphore, const BString& name,
46dcbc00c3SRene Gollent	int32 count, thread_id latestHolder)
47dcbc00c3SRene Gollent{
48dcbc00c3SRene Gollent	fTeam = team;
49dcbc00c3SRene Gollent	fSemaphore = semaphore;
50dcbc00c3SRene Gollent	fName = name;
51dcbc00c3SRene Gollent	fCount = count;
52dcbc00c3SRene Gollent	fLatestHolder = latestHolder;
53dcbc00c3SRene Gollent}
54