vdr 2.6.1
|
#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 |
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 |
Definition at line 233 of file include/vdr/thread.h.
cStateKey::cStateKey | ( | bool | IgnoreFirst = false | ) |
cStateKey::~cStateKey | ( | ) |
Definition at line 846 of file thread.c.
References ABORT, esyslog, cStateLock::name, stateLock, and cStateLock::threadId.
cStateKey::cStateKey | ( | bool | IgnoreFirst = false | ) |
Sets up a new state key.
If IgnoreFirst is true, the first use of this key with a lock will not return true if the lock's state hasn't explicitly changed.
cStateKey::~cStateKey | ( | ) |
|
inline |
Returns true if this key is currently in a lock.
Definition at line 260 of file include/vdr/thread.h.
References stateLock.
|
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 859 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(), cMenuRecordings::Delete(), cMenuChannels::Delete(), cMenuTimers::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(), cDvbPlayer::Save(), cVideoDirectoryScannerThread::ScanVideoDir(), cMenuChannels::Set(), cMenuRecordings::Set(), cMenuFolder::Set(), cMenuSchedule::Set(), cMenuTimers::Set(), cRecordControls::Start(), cMenuWhatsOn::Update(), and cMenuSchedule::Update().
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.
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 854 of file thread.c.
References state.
Referenced by cStateKey(), cMenuChannels::Delete(), main(), cMenuChannels::Set(), cMenuSchedule::Set(), cSkinLCARSDisplayMenu::SetMenuCategory(), and cMenuRecordings::Sort().
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.
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 869 of file thread.c.
References ABORT, esyslog, cStateLock::state, state, stateLock, cThread::ThreadId(), and write.
Referenced by 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.
|
inline |
Returns true if the last lock attempt this key was used with failed due to a timeout.
Definition at line 262 of file include/vdr/thread.h.
References timedOut.
Referenced by cSVDRPClientHandler::ProcessConnections().
|
inline |
|
friend |
Definition at line 234 of file include/vdr/thread.h.
|
private |
Definition at line 238 of file include/vdr/thread.h.
Referenced by cStateKey(), cStateLock::Lock(), Reset(), StateChanged(), and cStateLock::Unlock().
|
private |
Definition at line 236 of file include/vdr/thread.h.
Referenced by cStateKey(), InLock(), cStateLock::Lock(), Remove(), cStateLock::SetSyncStateKey(), StateChanged(), cStateLock::Unlock(), and ~cStateKey().
|
private |
Definition at line 239 of file include/vdr/thread.h.
Referenced by cStateLock::Lock(), and TimedOut().
|
private |
Definition at line 237 of file include/vdr/thread.h.
Referenced by cStateKey(), cStateLock::Lock(), StateChanged(), and cStateLock::Unlock().