pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

simutrans: patch around threading bug when creating train/tram tracks



Module Name:	pkgsrc-wip
Committed By:	i3enedek <git%xn--rvztrtkrfrgp-bbb7j2b8f0b9d7a21oft.com@localhost>
Pushed By:	i3enedek
Date:		Thu Nov 10 21:25:25 2016 +0000
Changeset:	178ed0ab4e91cb633103a69fc848e8bf1f264f68

Added Files:
	simutrans/patches/patch-boden_wege_weg.cc

Log Message:
simutrans: patch around threading bug when creating train/tram tracks

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=178ed0ab4e91cb633103a69fc848e8bf1f264f68

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 simutrans/patches/patch-boden_wege_weg.cc | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diffs:
diff --git a/simutrans/patches/patch-boden_wege_weg.cc b/simutrans/patches/patch-boden_wege_weg.cc
new file mode 100644
index 0000000..f27e427
--- /dev/null
+++ b/simutrans/patches/patch-boden_wege_weg.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+Work around threading bug in simutrans
+--- boden/wege/weg.cc.orig	2015-11-29 19:41:00.000000000 +0000
++++ boden/wege/weg.cc
+@@ -420,9 +420,6 @@ void weg_t::unlock_mutex()
+ 
+ void weg_t::calc_image()
+ {
+-#ifdef MULTI_THREAD
+-	pthread_mutex_lock( &weg_calc_bild_mutex );
+-#endif
+ 	grund_t *from = welt->lookup(get_pos());
+ 	grund_t *to;
+ 	image_id old_bild = bild;
+@@ -434,9 +431,6 @@ void weg_t::calc_image()
+ 		if(  from==NULL  ) {
+ 			dbg->error( "weg_t::calc_bild()", "Own way at %s not found!", get_pos().get_str() );
+ 		}
+-#ifdef MULTI_THREAD
+-		pthread_mutex_unlock( &weg_calc_bild_mutex );
+-#endif
+ 		return;	// otherwise crashing during enlargement
+ 	}
+ 	else if(  from->ist_tunnel() &&  from->ist_karten_boden()  &&  (grund_t::underground_mode==grund_t::ugm_none || (grund_t::underground_mode==grund_t::ugm_level && from->get_hoehe()<grund_t::underground_level))  ) {


Home | Main Index | Thread Index | Old Index