From 8e7f874db35395d100ca73d9433b25f2f7eae19d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jun 2012 18:11:38 +0200 Subject: COMMON: Make CoroutineScheduler's constructor and destructor private. CoroutineSchedule is a singleton, thus it should not be possible to create a custom instance of it. --- common/coroutines.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/common/coroutines.h b/common/coroutines.h index 3b8b1a77f9..64eabbf8f4 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -328,6 +328,18 @@ public: typedef void (*VFPTRPP)(PROCESS *); private: + friend class Singleton; + + /** + * Constructor + */ + CoroutineScheduler(); + + /** + * Destructor + */ + ~CoroutineScheduler(); + /** list of all processes */ PROCESS *processList; @@ -368,16 +380,6 @@ private: PROCESS *getProcess(uint32 pid); EVENT *getEvent(uint32 pid); public: - /** - * Constructor - */ - CoroutineScheduler(); - - /** - * Destructor - */ - ~CoroutineScheduler(); - /** * Kills all processes and places them on the free list. */ -- cgit v1.2.3