vdr 2.6.4
|
#include <thread.h>
Public Member Functions | |
cStateKey (bool IgnoreFirst=false) | |
~cStateKey () | |
void | Reset (void) |
void | Remove (bool IncState=true) |
bool | StateChanged (void) |
bool | InLock (void) |
bool | TimedOut (void) const |
Private Attributes | |
cStateLock * | stateLock |
bool | write |
int | state |
bool | timedOut |
Friends | |
class | cStateLock |
cStateKey::cStateKey | ( | bool | IgnoreFirst = false | ) |
cStateKey::~cStateKey | ( | ) |
Definition at line 854 of file thread.c.
References ABORT, esyslog, cStateLock::name, stateLock, and cStateLock::threadId.
|
inline |
void cStateKey::Remove | ( | bool | IncState = true | ) |
Removes this key from the lock it was previously used with.
If this key was used to obtain a write lock, the state of the lock will be incremented and copied to this key. You can set IncState to false to prevent this.
Definition at line 867 of file thread.c.
References ABORT, esyslog, stateLock, and cStateLock::Unlock().
Referenced by cDvbPlayer::Action(), cVideoDirectoryScannerThread::Action(), cMenuRecordingEdit::ApplyChanges(), cEIT::cEIT(), cReplayControl::ClearEditingMarks(), cSVDRPServer::CmdPLAY(), cMenuRecording::cMenuRecording(), cRecordControl::cRecordControl(), cMenuChannels::Delete(), cMenuTimers::Delete(), cMenuRecordings::Delete(), cSkinLCARSDisplayMenu::DrawTimers(), main(), cReplayControl::MarkToggle(), cMenuChannels::Move(), cMenuTimers::OnOff(), cEpgDataWriter::Perform(), cNitFilter::Process(), cPatFilter::Process(), cSdtFilter::Process(), cEITScanner::Process(), cSVDRPClientHandler::ProcessConnections(), cMenuEditChannel::ProcessKey(), cMenuRecordingEdit::RefreshRecording(), cMenuRecording::RefreshRecording(), cResumeFile::Save(), cDvbPlayer::Save(), cVideoDirectoryScannerThread::ScanVideoDir(), cMenuChannels::Set(), cMenuRecordings::Set(), cMenuFolder::Set(), cMenuSchedule::Set(), cMenuTimers::Set(), cRecordControls::Start(), cMenuWhatsOn::Update(), and cMenuSchedule::Update().
void cStateKey::Reset | ( | void | ) |
Resets the state of this key, so that the next call to a lock's Lock() function with this key will return true, even if the lock's state hasn't changed.
Definition at line 862 of file thread.c.
References state.
Referenced by cStateKey(), cMenuChannels::Delete(), main(), cMenuChannels::Set(), cMenuSchedule::Set(), cSkinLCARSDisplayMenu::SetMenuCategory(), and cMenuRecordings::Sort().
bool cStateKey::StateChanged | ( | void | ) |
Returns true if this key is used for obtaining a write lock, and the lock's state differs from that of the key.
When used with a read lock, it always returns true, because otherwise the lock wouldn't have been obtained in the first place.
Definition at line 877 of file thread.c.
References ABORT, esyslog, cStateLock::state, state, stateLock, cThread::ThreadId(), and write.
Referenced by main().
|
inline |
Returns true if the last lock attempt this key was used with failed due to a timeout.
Definition at line 262 of file thread.h.
References timedOut.
Referenced by cSVDRPClientHandler::ProcessConnections().
|
friend |
|
private |
Definition at line 238 of file thread.h.
Referenced by cStateKey(), cStateLock::Lock(), Reset(), StateChanged(), and cStateLock::Unlock().
|
private |
Definition at line 236 of file thread.h.
Referenced by cStateKey(), InLock(), cStateLock::Lock(), Remove(), cStateLock::SetSyncStateKey(), StateChanged(), cStateLock::Unlock(), and ~cStateKey().
|
private |
Definition at line 239 of file thread.h.
Referenced by cStateLock::Lock(), and TimedOut().
|
private |
Definition at line 237 of file thread.h.
Referenced by cStateKey(), cStateLock::Lock(), StateChanged(), and cStateLock::Unlock().