1
/* Copyright (C) 2003 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
//===========================================================================
22
// This is the main fuction for the AXE VM emulator.
23
// It contains some global objects and a run method.
25
//===========================================================================
26
#include <kernel_types.h>
27
#include <TransporterRegistry.hpp>
29
extern class JobTable globalJobTable;
30
extern class TimeQueue globalTimeQueue;
31
extern class FastScheduler globalScheduler;
32
extern class TransporterRegistry globalTransporterRegistry;
33
extern struct GlobalData globalData;
36
extern class SignalLoggerManager globalSignalLoggers;
39
#ifndef NO_EMULATED_JAM
40
#define EMULATED_JAM_SIZE 1024
41
#define JAM_MASK ((EMULATED_JAM_SIZE * 4) - 1)
43
extern Uint8 theEmulatedJam[];
44
extern Uint32 theEmulatedJamIndex;
45
// last block entry, used in dumpJam() if jam contains no block entries
46
extern Uint32 theEmulatedJamBlockNumber;
48
const Uint8 theEmulatedJam[]=0;
49
const Uint32 theEmulatedJamIndex=0;
53
class Configuration * theConfiguration;
54
class WatchDog * theWatchDog;
55
class ThreadConfig * theThreadConfig;
56
class SimBlockList * theSimBlockList;
57
class SocketServer * m_socket_server;
58
class Ndbd_mem_manager * m_mem_manager;
63
* Sets all the pointers to NULL
68
* Create all the objects
73
* Destroys all the objects
78
extern struct EmulatorData globalEmulatorData;
80
enum NdbShutdownType {
84
NST_ErrorHandlerSignal,
87
NST_ErrorHandlerStartup
92
NRT_NoStart_Restart = 1, // -n
93
NRT_DoStart_Restart = 2, //
94
NRT_NoStart_InitialStart = 3, // -n -i
95
NRT_DoStart_InitialStart = 4 // -i
99
* Shutdown/restart Ndb
101
* @param type - Type of shutdown/restart
102
* @param restartType - Type of restart (only valid if type == NST_Restart)
105
NdbShutdown(NdbShutdownType type,
106
NdbRestartType restartType = NRT_Default);