vdr 2.7.7
|
#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 | ( | ) |
|
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 869 of file thread.c.
References ABORT, esyslog, and stateLock.
Referenced by cDvbPlayer::Action(), cVideoDirectoryScannerThread::Action(), cMenuRecordingEdit::ApplyChanges(), cEIT::cEIT(), cReplayControl::ClearEditingMarks(), cSVDRPServer::CmdPLAY(), cRecordControl::cRecordControl(), cCuttingThread::HandleErrors(), main(), cReplayControl::MarkToggle(), cMenuTimers::OnOff(), cEpgDataWriter::Perform(), cEITScanner::Process(), cNitFilter::Process(), cPatFilter::Process(), cSdtFilter::Process(), cDvbPlayer::Save(), cResumeFile::Save(), cVideoDirectoryScannerThread::ScanVideoDir(), cMenuFolder::Set(), and cRecordControls::Start().
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 864 of file thread.c.
References state.
Referenced by cStateKey(), and main().
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 879 of file thread.c.
References ABORT, esyslog, state, stateLock, cThread::ThreadId(), and write.
Referenced by main().
|
inline |
|
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().