aboutsummaryrefslogtreecommitdiff
path: root/lib/base/ebase.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2007-05-25 00:51:08 +0000
committerFelix Domke <tmbinc@elitedvb.net>2007-05-25 00:51:08 +0000
commit2bc51a33ae4089d88a3a8a3e5fb56afafac69d35 (patch)
treea5bee47b9dbc23c1fbdf4986e20d7b05afcfb573 /lib/base/ebase.h
parent3ec9c0fb7a5fc5d1f5b1f86283861f9c0067e2a1 (diff)
downloadenigma2-2bc51a33ae4089d88a3a8a3e5fb56afafac69d35.tar.gz
enigma2-2bc51a33ae4089d88a3a8a3e5fb56afafac69d35.zip
add 'spinner' (non-idle detection)
Diffstat (limited to 'lib/base/ebase.h')
-rw-r--r--lib/base/ebase.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/base/ebase.h b/lib/base/ebase.h
index f14d07ac..27e4ec84 100644
--- a/lib/base/ebase.h
+++ b/lib/base/ebase.h
@@ -191,6 +191,7 @@ class eMainloop
int processOneEvent(unsigned int user_timeout, PyObject **res=0, ePyObject additional=ePyObject());
int retval;
int time_offset;
+ int m_is_idle;
pthread_mutex_t recalcLock;
int m_interrupt_requested;
@@ -211,7 +212,7 @@ public:
#endif
eMainloop()
- :app_quit_now(0),loop_level(0),retval(0), m_interrupt_requested(0)
+ :app_quit_now(0),loop_level(0),retval(0), m_is_idle(0), m_interrupt_requested(0)
{
existing_loops.push_back(this);
pthread_mutex_init(&recalcLock, 0);
@@ -242,6 +243,9 @@ public:
PyObject *poll(SWIG_PYOBJECT(ePyObject) dict, SWIG_PYOBJECT(ePyObject) timeout);
void interruptPoll();
void reset();
+
+ /* m_is_idle needs to be atomic, but it doesn't really matter much, as it's read-only from outside */
+ int isIdle() { return m_is_idle; }
};
/**