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