NAME OF MESSAGE HANDLER | Where and what. |
FalconMessageHandler | StandardUIHandler |
SimWndProc | Simulator |
ACMIWndProc | ACMI |
CampaignWndProc | CAMPTOOL version |
ToolWndProc | CAMPTOOL version |
PlayVoicesProc | CAMPTOOL version |
NOTES:
1. The HandleWinMain function initializes the SimWndProc while the
FalconMessageHandler is activated in FalconDisplay.Setup
F4THREADHANDLE
Is used in conjunction with movie threads.
a. The ThreadManager's construction indicates that there essentially are two threads;
1. The Campaign threadb. The helper functions are defined and implemented this way:
2. The Sim thread
We also become aware of the following define statement
#define
F4MAX_THREADS 20
c. The VU also has conceptualized threadsafety in its design.The VUThreads class tree explains these classes further.
Identified Win32 threads
Threads are spawn via regular Win32 calls. Either _createThreadex or _createThread
My Investigation has shown the following sequence of threads launched by the main application thread. But there are some threads which are activated as other threads are handled by the cpu(s). Yes Falcon is a CPU aware application. Multi symmetric processing is though only available with NT 4.0 which to my current knowledge only in some rare hardware and servicepack dependant cases can execute Falcon 4.0. This is mainly a question of the Video and Sound hardware used. Other available option are Win2K Professional and XP-Professional - but not XP-Home Edition.
MSP-aware threads
which is run exclusively with a second CPU.
During setup of the application and as part of the HandleWinMain function
The rest of the threads are either called into life on demand or activated before the GUI actually is responding to user input: There are currently identified 4 main WinMeesages that trigger most of the threads. Backtraceing to the origin from the threads beeing initialized and run showed early on that the threads found in th Source code are with exception of some sound related threads launched from single places in the source code.
(This Meesage will allways be excuted before the others) Within
WinMain.Cpp is
the the function SystemLevelInit that is responsible for the launch of the
simulator loop.
When this message is recieved UI threads are activated:
both activate 2 related threads
The latter one activates a
UI sounds are often related to mouse clicks and naturally we se many instances activated of the
F4CSECTIONHANDLE | Different Critical Sections are used to synchronize the threads in Falcon |
gUICriticalSection | |
campCritical | Initialized after FM_GAME_START: |
vuCritical | |
StreamCSection | |
QueueCritical | |
SetupCritSection | |
--- |
Functionality:
|