]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/FGTileLoader.cxx
Maik JUSTUS: fix bug in previous commit
[flightgear.git] / src / Scenery / FGTileLoader.cxx
index 03cb493d56e89ac88c18e0509d27a0e0fea5a69b..e8fee269a1e105902b516b583e86de91b2faaa3e 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -41,7 +41,7 @@ extern ssgBranch *ground;
  */
 FGTileLoader::FGTileLoader()
 {
-#if defined(ENABLE_THREADS) && ENABLE_THREADS
+#if defined(ENABLE_THREADS)
     // Create and start the loader threads.
     for (int i = 0; i < MAX_THREADS; ++i)
     {
@@ -56,7 +56,7 @@ FGTileLoader::FGTileLoader()
  */
 FGTileLoader::~FGTileLoader()
 {
-#if defined(ENABLE_THREADS) && ENABLE_THREADS
+#if defined(ENABLE_THREADS)
     // Wake up its time to die.
     // queue_cond.broadcast();
 
@@ -121,7 +121,7 @@ void
 FGTileLoader::update()
 {
 
-#if defined(ENABLE_THREADS) && ENABLE_THREADS
+#if defined(ENABLE_THREADS)
     // send a signal to the pager thread that it is allowed to load
     // another tile
     mutex.lock();
@@ -155,7 +155,17 @@ FGTileLoader::update()
 }
 
 
-#if defined(ENABLE_THREADS) && ENABLE_THREADS
+#if defined(ENABLE_THREADS)
+/**
+ * Ensure mutex is unlocked.
+ */
+void 
+cleanup_handler( void* arg )
+{
+    FGTileLoader* loader = (FGTileLoader*) arg;
+    loader->mutex.unlock();
+}
+
 /**
  * 
  */
@@ -192,14 +202,4 @@ FGTileLoader::LoaderThread::run()
     }
     pthread_cleanup_pop(1);
 }
-
-/**
- * Ensure mutex is unlocked.
- */
-void 
-cleanup_handler( void* arg )
-{
-    FGTileLoader* loader = (FGTileLoader*) arg;
-    loader->mutex.unlock();
-}
 #endif // ENABLE_THREADS