summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/TaskMan.h4
-rw-r--r--lib/TaskMan.cc10
2 files changed, 12 insertions, 2 deletions
diff --git a/include/TaskMan.h b/include/TaskMan.h
index 29b6cc1..5ce0107 100644
--- a/include/TaskMan.h
+++ b/include/TaskMan.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.h,v 1.27 2007-12-25 12:21:19 pixel Exp $ */
+/* $Id: TaskMan.h,v 1.28 2007-12-25 13:36:05 pixel Exp $ */
#ifndef __TASKMAN_H__
#define __TASKMAN_H__
@@ -53,6 +53,8 @@ class TaskMan : public Base {
static std::vector<Task *>::iterator begin();
static std::vector<Task *>::iterator end();
+ static int nb_tasks();
+ static int nb_zombies();
private:
class w4ha_t {
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index df37a04..efd48f0 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.cc,v 1.50 2007-12-25 12:21:19 pixel Exp $ */
+/* $Id: TaskMan.cc,v 1.51 2007-12-25 13:36:06 pixel Exp $ */
#ifndef _WIN32
#include <signal.h>
@@ -392,6 +392,14 @@ std::vector<Task *>::iterator TaskMan::end() {
return TaskList.end();
}
+int TaskMan::nb_tasks() {
+ return TaskList.size();
+}
+
+int TaskMan::nb_zombies() {
+ return Zombies.size();
+}
+
// Should only be called by the destructor of a task.
void TaskMan::RemoveFromWatches(Task * t) {
if (!w4ha.empty()) {