b0b6c34249
He writes: Here are the final changes to add threads to the tile loading. All the thread related code is in the new FGTileLoader class. ./configure.in ./acconfig.h Added --with-threads option and corresponding ENABLE_THREADS definition. The default is no threads. ./src/Scenery/tilemgr Removed load_queue and associated references. This has been replaced by a new class FGTileLoader in FGNewCache. Made the global variable global_tile_cache a member. schedule_needed(): removed global_tile_cache.exists() tests since sched_tile() effectively repeats the test. initialize_queue(): removed code that loads tiles since this is now performed by FGTileLoader. update(): ditto ./src/Scenery/newcache Added new class FGTileLoader to manage tile queuing and loading. tile_map typedefs are private. exists() is a const member function. fill_in(): deleted load_tile(): added. ./src/Scenery/FGTileLoader The new threaded tile loader. Maintains a queue of tiles waiting to be loaded and an array of one or more threads to load the tiles. Currently only a single thread is created. The queue is guarded by a mutex to synchronize access. A condition variable signals the thread when the queue is non-empty. CLO: I made a few tweaks to address a couple issues, hopefully what we have is solid, but now we kick it out to the general public to see. :-)
88 lines
2.2 KiB
Makefile
88 lines
2.2 KiB
Makefile
if ENABLE_UNIX_SERIAL
|
|
SERIAL_LIBS = -lsgserial
|
|
else
|
|
SERIAL_LIBS =
|
|
endif
|
|
|
|
if ENABLE_OLD_WEATHER
|
|
WEATHER_LIBS = $(top_builddir)/src/Weather/libWeather.a
|
|
else
|
|
WEATHER_LIBS = $(top_builddir)/src/WeatherCM/libWeatherCM.a
|
|
endif
|
|
|
|
if ENABLE_NETWORK_OLK
|
|
NETWORK_LIBS = \
|
|
$(top_builddir)/src/Network/libNetwork.a \
|
|
$(top_builddir)/src/NetworkOLK/libNetworkOLK.a
|
|
else
|
|
NETWORK_LIBS = \
|
|
$(top_builddir)/src/Network/libNetwork.a
|
|
endif
|
|
|
|
if WITH_THREADS
|
|
THREAD_LIBS = -lsgthreads
|
|
else
|
|
THREAD_LIBS =
|
|
endif
|
|
|
|
if OLD_AUTOMAKE
|
|
# nothing CXXFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\"
|
|
else
|
|
AM_CXXFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\"
|
|
endif
|
|
|
|
EXTRA_DIST = 3dfx.sh runfgfs.in runfgfs.bat.in
|
|
|
|
bin_PROGRAMS = fgfs
|
|
|
|
noinst_SCRIPTS = runfgfs runfgfs.bat
|
|
|
|
bin_SCRIPTS = runfgfs
|
|
|
|
fgfs_SOURCES = \
|
|
main.cxx \
|
|
bfi.cxx bfi.hxx \
|
|
fg_init.cxx fg_init.hxx \
|
|
fg_io.cxx fg_io.hxx \
|
|
fg_props.cxx fg_props.hxx \
|
|
fgfs.cxx fgfs.hxx \
|
|
globals.cxx globals.hxx \
|
|
keyboard.cxx keyboard.hxx \
|
|
options.cxx options.hxx \
|
|
splash.cxx splash.hxx \
|
|
viewer.cxx viewer.hxx \
|
|
viewer_lookat.cxx viewer_lookat.hxx \
|
|
viewer_rph.cxx viewer_rph.hxx \
|
|
viewmgr.cxx viewmgr.hxx
|
|
|
|
fgfs_LDADD = \
|
|
$(top_builddir)/src/Aircraft/libAircraft.a \
|
|
$(top_builddir)/src/Autopilot/libAutopilot.a \
|
|
$(top_builddir)/src/Cockpit/libCockpit.a \
|
|
$(top_builddir)/src/Controls/libControls.a \
|
|
$(top_builddir)/src/FDM/libFlight.a \
|
|
$(top_builddir)/src/FDM/Balloon/libBalloon.a \
|
|
$(top_builddir)/src/FDM/JSBSim/libJSBSim.a \
|
|
$(top_builddir)/src/FDM/JSBSim/filtersjb/libfiltersjb.a \
|
|
$(top_builddir)/src/FDM/LaRCsim/libLaRCsim.a \
|
|
$(top_builddir)/src/FDM/UIUCModel/libUIUCModel.a \
|
|
$(top_builddir)/src/GUI/libGUI.a \
|
|
$(top_builddir)/src/Navaids/libNavaids.a \
|
|
$(top_builddir)/src/Scenery/libScenery.a \
|
|
$(top_builddir)/src/Sound/libSound.a \
|
|
$(top_builddir)/src/Airports/libAirports.a \
|
|
$(NETWORK_LIBS) \
|
|
$(top_builddir)/src/Objects/libObjects.a \
|
|
$(top_builddir)/src/Time/libTime.a \
|
|
$(WEATHER_LIBS) \
|
|
$(top_builddir)/src/Joystick/libJoystick.a \
|
|
-lsgroute -lsgsky -lsgephem -lsgtiming -lsgio -lsgscreen \
|
|
-lsgmath -lsgbucket -lsgdebug -lsgmagvar -lsgmisc -lsgxml \
|
|
$(SERIAL_LIBS) \
|
|
$(THREAD_LIBS) \
|
|
-lplibpu -lplibfnt -lplibssg -lplibsg \
|
|
-lmk4 -lz \
|
|
$(opengl_LIBS) \
|
|
$(audio_LIBS)
|
|
|
|
INCLUDES += -I$(top_srcdir) -I$(top_srcdir)/src
|