1999-09-27 18:44:28 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "syscontr.h"
|
|
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Ensure, that only one controller exist inside process
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
// global controller variable
|
|
|
|
SystemcallsSingletoncontroller *
|
|
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
1999-10-02 16:21:10 +00:00
|
|
|
contr = 0;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
// reference count
|
|
|
|
int SystemcallsSingletoncontroller::Startcontroller::
|
|
|
|
refcount = 0;
|
|
|
|
|
|
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
1999-10-12 21:37:10 +00:00
|
|
|
Startcontroller() {
|
1999-09-27 18:44:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
1999-10-12 21:37:10 +00:00
|
|
|
~Startcontroller() {
|
1999-09-27 18:44:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Give reference to global controller-instance
|
|
|
|
//
|
|
|
|
SystemcallsSingletoncontroller *
|
1999-10-12 21:37:10 +00:00
|
|
|
SystemcallsSingletoncontroller::Startcontroller::getController()
|
1999-09-27 18:44:28 +00:00
|
|
|
{
|
1999-10-12 21:37:10 +00:00
|
|
|
if (!contr) {
|
|
|
|
// Create the global controller
|
|
|
|
contr = new SystemcallsSingletoncontroller;
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
refcount++;
|
|
|
|
return contr;
|
|
|
|
}
|