Merge lp:~armagetronad-dev/armagetronad/trunk-armagetronad-boostthread into lp:~armagetronad-dev/armagetronad/trunk-armagetronad-work

Proposed by Manuel Moos
Status: Merged
Merged at revision: 1102
Proposed branch: lp:~armagetronad-dev/armagetronad/trunk-armagetronad-boostthread
Merge into: lp:~armagetronad-dev/armagetronad/trunk-armagetronad-work
Diff against target: 1487 lines (+519/-454)
22 files modified
MacOS/Armagetron Advanced.xcodeproj/project.pbxproj (+12/-0)
acinclude.m4 (+0/-224)
configure.ac (+8/-9)
src/Makefile.am (+3/-0)
src/macosx/config_common.h (+3/-0)
src/macosx/dedicated/aa_config.h (+1/-0)
src/network/nAuthentication.cpp (+37/-64)
src/tools/pthread-binding.h (+0/-82)
src/tools/tError.cpp (+1/-1)
src/tools/tLockedQueue.h (+74/-0)
src/tools/tMemManager.cpp (+7/-31)
src/tools/tMutex.cpp (+82/-0)
src/tools/tMutex.h (+150/-0)
src/tools/tSafePTR.h (+8/-8)
src/tools/tThread.h (+105/-0)
src/tools/tToDo.cpp (+8/-23)
src/win32/config_common.h (+4/-0)
src/win32_ded/aa_config.h (+0/-1)
win32/code_blocks/ArmagetronAd.cbp (+5/-3)
win32/code_blocks/ArmagetronAd.workspace (+1/-2)
win32/code_blocks/Dedicated.cbp (+5/-3)
win32/code_blocks/Master.cbp (+5/-3)
To merge this branch: bzr merge lp:~armagetronad-dev/armagetronad/trunk-armagetronad-boostthread
Reviewer Review Type Date Requested Status
dlh Approve
Review via email: mp+72885@code.launchpad.net

Description of the change

Switching from zthread to boost::thread which is better maintained and easier to install on Unix.
Windows is a little bit of a PITA, but only for the winlibs maintainer (the static library needs to be built with bjam, which first needs to be compiled itself), no change for the game builder, though.

Left todo: the mac side. For the time being, the bits we use can be emulated by a tiny pthread wrapper in the main source which should work fine (we're just using threads, two mutex types and two lock types), but it's only a matter of time before someone gets the idea to use futures and whatnot.

To post a comment you must log in.
1076. By dlh

Add new thread files to Mac OS X project.

1077. By dlh

Use pthreads. Building the boost thread library as a universal binary supporting Mac OS X 10.4 is tricky...

1078. By dlh

Enable authentication for Mac OS X dedicated servers

Revision history for this message
dlh (dlh) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MacOS/Armagetron Advanced.xcodeproj/project.pbxproj'
--- MacOS/Armagetron Advanced.xcodeproj/project.pbxproj 2011-08-01 00:57:22 +0000
+++ MacOS/Armagetron Advanced.xcodeproj/project.pbxproj 2011-09-11 04:47:25 +0000
@@ -136,6 +136,8 @@
136 9B9755160F44B0DE00E41662 /* nBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B9755140F44B0DE00E41662 /* nBinary.cpp */; };136 9B9755160F44B0DE00E41662 /* nBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B9755140F44B0DE00E41662 /* nBinary.cpp */; };
137 9B9755170F44B0DE00E41662 /* nBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B9755140F44B0DE00E41662 /* nBinary.cpp */; };137 9B9755170F44B0DE00E41662 /* nBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B9755140F44B0DE00E41662 /* nBinary.cpp */; };
138 9B97553D0F44B3EC00E41662 /* libarmaprotobuf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B97546A0F44AA2700E41662 /* libarmaprotobuf.a */; };138 9B97553D0F44B3EC00E41662 /* libarmaprotobuf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B97546A0F44AA2700E41662 /* libarmaprotobuf.a */; };
139 9BB084E4141C5FED009B30D0 /* tMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BB084E1141C5FED009B30D0 /* tMutex.cpp */; };
140 9BB084E5141C5FED009B30D0 /* tMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BB084E1141C5FED009B30D0 /* tMutex.cpp */; };
139 9BB7B4000D8246A2004FE8C3 /* config in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9BD7DAE20A2CAE0700D7033C /* config */; };141 9BB7B4000D8246A2004FE8C3 /* config in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9BD7DAE20A2CAE0700D7033C /* config */; };
140 9BB7B4010D8246A2004FE8C3 /* language in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9BD7DAFE0A2CAE1D00D7033C /* language */; };142 9BB7B4010D8246A2004FE8C3 /* language in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9BD7DAFE0A2CAE1D00D7033C /* language */; };
141 9BB7B5E10D8302FA004FE8C3 /* eAdvWall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BB7B5A60D8302FA004FE8C3 /* eAdvWall.cpp */; };143 9BB7B5E10D8302FA004FE8C3 /* eAdvWall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BB7B5A60D8302FA004FE8C3 /* eAdvWall.cpp */; };
@@ -631,6 +633,10 @@
631 9B9755140F44B0DE00E41662 /* nBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nBinary.cpp; sourceTree = "<group>"; };633 9B9755140F44B0DE00E41662 /* nBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nBinary.cpp; sourceTree = "<group>"; };
632 9B9755150F44B0DE00E41662 /* nBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nBinary.h; sourceTree = "<group>"; };634 9B9755150F44B0DE00E41662 /* nBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nBinary.h; sourceTree = "<group>"; };
633 9B9E56300D81D962008DD17D /* shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = shared.xcconfig; sourceTree = "<group>"; };635 9B9E56300D81D962008DD17D /* shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = shared.xcconfig; sourceTree = "<group>"; };
636 9BB084E0141C5FED009B30D0 /* tLockedQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tLockedQueue.h; sourceTree = "<group>"; };
637 9BB084E1141C5FED009B30D0 /* tMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tMutex.cpp; sourceTree = "<group>"; };
638 9BB084E2141C5FED009B30D0 /* tMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tMutex.h; sourceTree = "<group>"; };
639 9BB084E3141C5FED009B30D0 /* tThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tThread.h; sourceTree = "<group>"; };
634 9BB5B9240D84604400BF5F1C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../src/macosx/Info.plist; sourceTree = SOURCE_ROOT; };640 9BB5B9240D84604400BF5F1C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../src/macosx/Info.plist; sourceTree = SOURCE_ROOT; };
635 9BB5B9270D84605700BF5F1C /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = English; path = InfoPlist.strings.in; sourceTree = "<group>"; };641 9BB5B9270D84605700BF5F1C /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = English; path = InfoPlist.strings.in; sourceTree = "<group>"; };
636 9BB7B5A60D8302FA004FE8C3 /* eAdvWall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eAdvWall.cpp; sourceTree = "<group>"; };642 9BB7B5A60D8302FA004FE8C3 /* eAdvWall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eAdvWall.cpp; sourceTree = "<group>"; };
@@ -1421,11 +1427,14 @@
1421 9BB7B7C50D830422004FE8C3 /* tList.h */,1427 9BB7B7C50D830422004FE8C3 /* tList.h */,
1422 9BB7B7C60D830422004FE8C3 /* tLocale.cpp */,1428 9BB7B7C60D830422004FE8C3 /* tLocale.cpp */,
1423 9BB7B7C70D830422004FE8C3 /* tLocale.h */,1429 9BB7B7C70D830422004FE8C3 /* tLocale.h */,
1430 9BB084E0141C5FED009B30D0 /* tLockedQueue.h */,
1424 9BB7B7C80D830422004FE8C3 /* tMath.h */,1431 9BB7B7C80D830422004FE8C3 /* tMath.h */,
1425 9BB7B7C90D830422004FE8C3 /* tMemManager.cpp */,1432 9BB7B7C90D830422004FE8C3 /* tMemManager.cpp */,
1426 9BB7B7CA0D830422004FE8C3 /* tMemManager.h */,1433 9BB7B7CA0D830422004FE8C3 /* tMemManager.h */,
1427 9BB7B7CB0D830422004FE8C3 /* tMemStack.cpp */,1434 9BB7B7CB0D830422004FE8C3 /* tMemStack.cpp */,
1428 9BB7B7CC0D830422004FE8C3 /* tMemStack.h */,1435 9BB7B7CC0D830422004FE8C3 /* tMemStack.h */,
1436 9BB084E1141C5FED009B30D0 /* tMutex.cpp */,
1437 9BB084E2141C5FED009B30D0 /* tMutex.h */,
1429 9BB7B7CD0D830422004FE8C3 /* tPlayList.cpp */,1438 9BB7B7CD0D830422004FE8C3 /* tPlayList.cpp */,
1430 9BB7B7CE0D830422004FE8C3 /* tPlayList.h */,1439 9BB7B7CE0D830422004FE8C3 /* tPlayList.h */,
1431 9B9754D90F44AFB700E41662 /* tPolynomial.cpp */,1440 9B9754D90F44AFB700E41662 /* tPolynomial.cpp */,
@@ -1457,6 +1466,7 @@
1457 9BB7B7EA0D830422004FE8C3 /* tString.h */,1466 9BB7B7EA0D830422004FE8C3 /* tString.h */,
1458 9BB7B7EB0D830422004FE8C3 /* tSysTime.cpp */,1467 9BB7B7EB0D830422004FE8C3 /* tSysTime.cpp */,
1459 9BB7B7EC0D830422004FE8C3 /* tSysTime.h */,1468 9BB7B7EC0D830422004FE8C3 /* tSysTime.h */,
1469 9BB084E3141C5FED009B30D0 /* tThread.h */,
1460 9BB7B7ED0D830422004FE8C3 /* tToDo.cpp */,1470 9BB7B7ED0D830422004FE8C3 /* tToDo.cpp */,
1461 9BB7B7EE0D830422004FE8C3 /* tToDo.h */,1471 9BB7B7EE0D830422004FE8C3 /* tToDo.h */,
1462 9BB7B7EF0D830422004FE8C3 /* tValue.h */,1472 9BB7B7EF0D830422004FE8C3 /* tValue.h */,
@@ -2035,6 +2045,7 @@
2035 9B62588C0F5865410083C429 /* zFortress.cpp in Sources */,2045 9B62588C0F5865410083C429 /* zFortress.cpp in Sources */,
2036 9B62588D0F5865410083C429 /* zTimedZone.cpp in Sources */,2046 9B62588D0F5865410083C429 /* zTimedZone.cpp in Sources */,
2037 9B0C8B3E0F7EBA78001802CD /* eChat.cpp in Sources */,2047 9B0C8B3E0F7EBA78001802CD /* eChat.cpp in Sources */,
2048 9BB084E5141C5FED009B30D0 /* tMutex.cpp in Sources */,
2038 );2049 );
2039 runOnlyForDeploymentPostprocessing = 0;2050 runOnlyForDeploymentPostprocessing = 0;
2040 };2051 };
@@ -2202,6 +2213,7 @@
2202 9B62588A0F5865410083C429 /* zFortress.cpp in Sources */,2213 9B62588A0F5865410083C429 /* zFortress.cpp in Sources */,
2203 9B62588B0F5865410083C429 /* zTimedZone.cpp in Sources */,2214 9B62588B0F5865410083C429 /* zTimedZone.cpp in Sources */,
2204 9B0C8B3D0F7EBA78001802CD /* eChat.cpp in Sources */,2215 9B0C8B3D0F7EBA78001802CD /* eChat.cpp in Sources */,
2216 9BB084E4141C5FED009B30D0 /* tMutex.cpp in Sources */,
2205 );2217 );
2206 runOnlyForDeploymentPostprocessing = 0;2218 runOnlyForDeploymentPostprocessing = 0;
2207 };2219 };
22082220
=== modified file 'acinclude.m4'
--- acinclude.m4 2009-07-15 07:17:41 +0000
+++ acinclude.m4 2011-09-11 04:47:25 +0000
@@ -555,230 +555,6 @@
555 fi555 fi
556])556])
557557
558dnl Modified ZThread test follows. This one works, AM_PATH_ZTHREAD alone does not.
559dnl Changes: hacked compiler temporarily to use CXX instead of CC
560dnl added zthread/ to include path
561dnl added #include "zthread/Task.h" and #include "zthread/Thread.h"
562dnl added HAVE_LIBZTHREAD define
563
564dnl Copyright (c) 2005, Eric Crahen
565dnl
566dnl Permission is hereby granted, free of charge, to any person obtaining a copy
567dnl of this software and associated documentation files (the "Software"), to deal
568dnl in the Software without restriction, including without limitation the rights
569dnl to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
570dnl copies of the Software, and to permit persons to whom the Software is furnished
571dnl to do so, subject to the following conditions:
572dnl
573dnl The above copyright notice and this permission notice shall be included in all
574dnl copies or substantial portions of the Software.
575dnl
576dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
577dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
578dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
579dnl AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
580dnl WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
581dnl CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
582
583dnl Detect the library and include paths for ZThreads, perform some test
584dnl compilations.
585dnl
586dnl Should be used in AC_PROG_CC mode before the swtich to C++ if any is made
587dnl (eg before AC_LANG_CPLUSPLUS)
588dnl
589dnl --with-zthread-prefix : Skip detection, use this general path
590dnl --with-zthread-exec-prefix : Skip detecting the zthread-config tool
591dnl
592dnl Sets the following variables.
593dnl
594dnl ZTHREAD_CXXFLAGS
595dnl ZTHREAD_LIBS
596dnl
597AC_DEFUN([AM_PATH_ZTHREAD_AA],
598[
599
600
601AC_ARG_WITH(zthread-prefix,[ --with-zthread-prefix=PFX Prefix where ZTHREAD is installed (optional)],
602 zthread_prefix="$withval", zthread_prefix="")
603AC_ARG_WITH(zthread-exec-prefix,[ --with-zthread-exec-prefix=PFX Exec prefix where ZTHREAD is installed (optional)],
604 zthread_exec_prefix="$withval", zthread_exec_prefix="")
605AC_ARG_ENABLE(zthreadtest, [ --disable-zthreadtest Do not try to compile and run a test ZTHREAD program],
606 , enable_zthreadtest=yes)
607
608 if test x$zthread_exec_prefix != x ; then
609 zthread_args="$zthread_args --exec-prefix=$zthread_exec_prefix"
610 if test x${ZTHREAD_CONFIG+set} != xset ; then
611 ZTHREAD_CONFIG=$zthread_exec_prefix/bin/zthread-config
612 fi
613 fi
614 if test x$zthread_prefix != x ; then
615 zthread_args="$zthread_args --prefix=$zthread_prefix"
616 if test x${ZTHREAD_CONFIG+set} != xset ; then
617 ZTHREAD_CONFIG=$zthread_prefix/bin/zthread-config
618 fi
619 fi
620
621 AC_PATH_PROG(ZTHREAD_CONFIG, zthread-config, no)
622 min_zthread_version=ifelse([$1], ,0.11.0,$1)
623 AC_MSG_CHECKING(for ZTHREAD - version >= $min_zthread_version)
624 no_zthread=""
625 if test "$ZTHREAD_CONFIG" = "no" ; then
626 no_zthread=yes
627 else
628 ZTHREAD_CXXFLAGS=`$ZTHREAD_CONFIG $zthreadconf_args --cflags`
629 ZTHREAD_LIBS=`$ZTHREAD_CONFIG $zthreadconf_args --libs`
630
631 zthread_major_version=`$ZTHREAD_CONFIG $zthread_args --version | \
632 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
633 zthread_minor_version=`$ZTHREAD_CONFIG $zthread_args --version | \
634 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
635 zthread_micro_version=`$ZTHREAD_CONFIG $zthread_config_args --version | \
636 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
637 if test "x$enable_zthreadtest" = "xyes" ; then
638 ac_save_CXXFLAGS="$CXXFLAGS"
639 ac_save_CFLAGS="$CFLAGS"
640 ac_save_LIBS="$LIBS"
641 CXXFLAGS="$CXXFLAGS $ZTHREAD_CXXFLAGS"
642 CFLAGS="$CFLAGS $ZTHREAD_CXXFLAGS"
643 LIBS="$LIBS $ZTHREAD_LIBS"
644
645dnl
646dnl Now check if the installed ZTHREAD is sufficiently new. (Also sanity
647dnl checks the results of zthread-config to some extent
648dnl
649 rm -f conf.zthreadtest
650 CC_OLD=${CC}
651 CC=${CXX}
652 for extra_flags in "NONE" "-fpermissive"; do
653 if test NONE != ${extra_flags}; then
654 ZTHREAD_CXXFLAGS="$ZTHREAD_CXXFLAGS ${extra_flags}"
655 CXXFLAGS="$CXXFLAGS ${extra_flags}"
656 CFLAGS="$CFLAGS ${extra_flags}"
657 fi
658 if test "x$no_zthread" = xyes || test NONE = ${extra_flags} ; then
659 no_zthread=""
660 AC_TRY_RUN([
661
662
663#include <stdio.h>
664#include <string.h>
665#include <unistd.h>
666#include "zthread/Task.h"
667#include "zthread/Thread.h"
668#include "zthread/ZThread.h"
669
670int main (int argc, char *argv[]) {
671
672 int major, minor, micro;
673 char tmp_version[256];
674
675 { FILE *fp = fopen("conf.zthreadtest", "a"); if ( fp ) fclose(fp); }
676
677
678 /* HP/UX 9 (%@#!) writes to sscanf strings */
679 strcpy(tmp_version, "$min_zthread_version");
680
681 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
682
683 printf("%s, bad version string\n", "$min_zthread_version");
684 return 1;
685
686 }
687
688 if (($zthread_major_version > major) ||
689 (($zthread_major_version == major) && ($zthread_minor_version > minor)) ||
690 (($zthread_major_version == major) && ($zthread_minor_version == minor) &&
691 ($zthread_micro_version >= micro))) {
692 return 0;
693 } else {
694
695 printf("\n*** 'zthread-config --version' returned %d.%d.%d, but the minimum version\n", $zthread_major_version, $zthread_minor_version, $zthread_micro_version);
696 printf("*** of ZThread required is %d.%d.%d. If zthread-config is correct, then it is\n", major, minor, micro);
697 printf("*** best to upgrade to the required version.\n");
698 printf("*** If zthread-config was wrong, set the environment variable ZTHREAD_CONFIG\n");
699 printf("*** to point to the correct copy of zthread-config, and remove the file\n");
700 printf("*** config.cache before re-running configure\n");
701
702 return 1;
703 }
704
705}
706
707],, no_zthread=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
708 fi
709 done
710 CC=${CC_OLD}
711 CXXFLAGS="$ac_save_CXXFLAGS"
712 LIBS="$ac_save_LIBS"
713 fi
714 fi
715
716 if test "x$no_zthread" = x ; then
717
718 AC_DEFINE(HAVE_LIBZTHREAD,[], [Define if you have the library ZThread.])
719 AC_MSG_RESULT(yes)
720 ifelse([$2], , :, [$2])
721
722 else
723
724 AC_MSG_RESULT(no)
725
726 if test "$ZTHREAD_CONFIG" = "no" ; then
727
728 echo "*** The zthread-config script installed by ZThread could not be found"
729 echo "*** If ZThread was installed in PREFIX, make sure PREFIX/bin is in"
730 echo "*** your path, or set the ZTHREAD_CONFIG environment variable to the"
731 echo "*** full path to zthread-config."
732
733 else
734 if test -f conf.zthreadtest ; then
735 :
736 else
737
738 echo "*** Could not run ZThread test program, checking why..."
739 CC_OLD=${CC}
740 CC=${CXX}
741 CXXFLAGS="$CXXFLAGS $ZTHREAD_CXXFLAGS"
742 LIBS="$LIBS $ZTHREAD_LIBS"
743
744 echo $LIBS;
745
746 AC_TRY_LINK([#include "zthread/Task.h"],
747 [ return 0; ], [
748 echo "*** The test program compiled, but did not run. This usually means"
749 echo "*** that the run-time linker is not finding ZThread or finding the wrong"
750 echo "*** version of ZThread. If it is not finding ZThread, you'll need to set your"
751 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
752 echo "*** to the installed location Also, make sure you have run ldconfig if that"
753 echo "*** is required on your system"
754 echo "***"
755 echo "*** If you have an old version installed, it is best to remove it, although"
756 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
757 [ echo "*** The test program failed to compile or link. See the file config.log for the"
758 echo "*** exact error that occured. This usually means ZThread was incorrectly installed"
759 echo "*** or that you have moved ZThread since it was installed. In the latter case, you"
760 echo "*** may want to edit the zthread-config script: $ZTHREAD_CONFIG" ])
761
762 CC=${CC_OLD}
763 CFLAGS="$ac_save_CFLAGS"
764 CXXFLAGS="$ac_save_CXXFLAGS"
765 LIBS="$ac_save_LIBS"
766 fi
767 fi
768
769 ZTHREAD_CXXFLAGS=""
770 ZTHREAD_LIBS=""
771 ifelse([$3], , :, [$3])
772
773 fi
774
775 AC_SUBST(ZTHREAD_CXXFLAGS)
776 AC_SUBST(ZTHREAD_LIBS)
777
778 rm -f conf.zthreadtest
779
780])
781
782dnl Copyright © 2008 Steven G. Johnson <stevenj@alum.mit.edu> 558dnl Copyright © 2008 Steven G. Johnson <stevenj@alum.mit.edu>
783dnl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 559dnl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
784dnl This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 560dnl This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
785561
=== modified file 'configure.ac'
--- configure.ac 2011-08-26 15:34:37 +0000
+++ configure.ac 2011-09-11 04:47:25 +0000
@@ -670,26 +670,25 @@
670670
671AC_LANG([C++])671AC_LANG([C++])
672672
673AC_CHECK_LIB([boost_thread],_ZNK5boost6thread6get_idEv,,[
674
673ACX_PTHREAD([675ACX_PTHREAD([
674676
675LIBS="${PTHREAD_LIBS} ${LIBS}"677LIBS="${PTHREAD_LIBS} ${LIBS}"
676CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"678CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"
677CC="${PTHREAD_CC}"679CC="${PTHREAD_CC}"
678dnl AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])680AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
679681
680],[682],)
681
682AM_PATH_ZTHREAD_AA(2.3.2)
683CXXFLAGS="${CXXFLAGS} ${ZTHREAD_CXXFLAGS}"
684LIBS="${LIBS} ${ZTHREAD_LIBS}"
685683
686])684])
687685
688fi # krawall686
687fi # armathentication
689688
690689
691dnl *************************************************690dnl *************************************************
692dnl pattern buffers691dnl protocol buffers
693dnl *************************************************692dnl *************************************************
694693
695dnl check for compiler694dnl check for compiler
696695
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2011-08-26 13:48:33 +0000
+++ src/Makefile.am 2011-09-11 04:47:25 +0000
@@ -89,6 +89,9 @@
89 tools/tRectangle.h tools/tRectangle.cpp \89 tools/tRectangle.h tools/tRectangle.cpp \
90 tools/tPlayList.h tools/tPlayList.cpp\90 tools/tPlayList.h tools/tPlayList.cpp\
91 tools/tDecorator.h tools/tDecorator.cpp\91 tools/tDecorator.h tools/tDecorator.cpp\
92 tools/tMutex.h tools/tMutex.cpp\
93 tools/tThread.h\
94 tools/tLockedQueue.h\
92 tools/tCoord.h tools/tCoord.cpp\95 tools/tCoord.h tools/tCoord.cpp\
93 tools/tValue.h tools/tValueParser.h\96 tools/tValue.h tools/tValueParser.h\
94 tools/tFunction.h tools/tFunction.cpp\97 tools/tFunction.h tools/tFunction.cpp\
9598
=== modified file 'src/macosx/config_common.h'
--- src/macosx/config_common.h 2008-03-09 18:02:20 +0000
+++ src/macosx/config_common.h 2011-09-11 04:47:25 +0000
@@ -174,3 +174,6 @@
174174
175/* Define to empty if `const' does not conform to ANSI C. */175/* Define to empty if `const' does not conform to ANSI C. */
176/* #undef const */176/* #undef const */
177
178//#define HAVE_LIBBOOST_THREAD 1
179#define HAVE_PTHREAD 1
177180
=== modified file 'src/macosx/dedicated/aa_config.h'
--- src/macosx/dedicated/aa_config.h 2006-11-11 13:12:48 +0000
+++ src/macosx/dedicated/aa_config.h 2011-09-11 04:47:25 +0000
@@ -2,3 +2,4 @@
22
3#define USER_DATA_DIR "~/Library/Application Support/Armagetron Advanced Dedicated"3#define USER_DATA_DIR "~/Library/Application Support/Armagetron Advanced Dedicated"
4#define DEDICATED 14#define DEDICATED 1
5#define KRAWALL_SERVER 1
56
=== modified file 'src/network/nAuthentication.cpp'
--- src/network/nAuthentication.cpp 2011-01-01 18:14:12 +0000
+++ src/network/nAuthentication.cpp 2011-09-11 04:47:25 +0000
@@ -46,26 +46,10 @@
4646
47#include <deque>47#include <deque>
4848
49#ifdef HAVE_LIBZTHREAD49#include "tLockedQueue.h"
50#include <zthread/Thread.h>50
51#include <zthread/LockedQueue.h>51#include "tThread.h"
52//#include <zthread/ClassLockable.h>52#include "tMutex.h"
53#include <zthread/FastMutex.h>
54#include <zthread/FastRecursiveMutex.h>
55#include <zthread/Guard.h>
56// #include <zthread/SynchronousExecutor.h>
57#include <zthread/ThreadedExecutor.h>
58typedef ZThread::ThreadedExecutor nExecutor;
59//typedef ZThread::SynchronousExecutor nExecutor;
60typedef ZThread::FastMutex nMutex;
61#define nQueue ZThread::LockedQueue
62#elif defined(HAVE_PTHREAD)
63#include "pthread-binding.h"
64typedef tPThreadMutex nMutex;
65#define nQueue tPThreadQueue
66#else
67typedef tNonMutex nMutex;
68#endif
6953
70bool sn_supportRemoteLogins = false;54bool sn_supportRemoteLogins = false;
7155
@@ -216,17 +200,8 @@
216200
217//! template that runs void member functions of reference countable objects201//! template that runs void member functions of reference countable objects
218template< class T > class nMemberFunctionRunnerTemplate202template< class T > class nMemberFunctionRunnerTemplate
219#ifdef HAVE_LIBZTHREAD
220 : public ZThread::Runnable
221#endif
222{203{
223private:204private:
224#if defined(HAVE_PTHREAD) && !defined(HAVE_LIBZTHREAD)
225 static void* DoCall( void *o ) {
226 nMemberFunctionRunnerTemplate * functionRunner = (nMemberFunctionRunnerTemplate*) o;
227 ( (functionRunner->object_)->*(functionRunner->function_) )();
228 }
229#endif
230public:205public:
231 nMemberFunctionRunnerTemplate( T & object, void (T::*function)() )206 nMemberFunctionRunnerTemplate( T & object, void (T::*function)() )
232 : object_( &object ), function_( function )207 : object_( &object ), function_( function )
@@ -239,6 +214,11 @@
239 (object_->*function_)();214 (object_->*function_)();
240 }215 }
241216
217 void operator () ()
218 {
219 run();
220 }
221
242 //! schedule a task for execution at the next convenient break, between game rounds for example222 //! schedule a task for execution at the next convenient break, between game rounds for example
243 static void ScheduleBreak( T & object, void (T::*function)() )223 static void ScheduleBreak( T & object, void (T::*function)() )
244 {224 {
@@ -248,19 +228,15 @@
248 //! schedule a task for execution in a background thread228 //! schedule a task for execution in a background thread
249 static void ScheduleBackground( T & object, void (T::*function)() )229 static void ScheduleBackground( T & object, void (T::*function)() )
250 {230 {
251#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD)231 bool delays = true;
232#ifdef HAVE_THREADS
233 delays = tRecorder::IsRunning();
234#endif
235
252 // schedule the task into a background thread236 // schedule the task into a background thread
253 if ( !tRecorder::IsRunning() )237 if ( !delays )
254 {238 {
255#if !defined(HAVE_LIBZTHREAD)239 boost::thread(nMemberFunctionRunnerTemplate<T>( object, function ) );
256 nMemberFunctionRunnerTemplate<T> * runner = new nMemberFunctionRunnerTemplate<T>( object, function );
257
258 pthread_t thread;
259 pthread_create(&thread, NULL, (nMemberFunctionRunnerTemplate::DoCall), (void*) runner);
260#else
261 static nExecutor executor;
262 executor.execute( ZThread::Task( new nMemberFunctionRunnerTemplate( object, function ) ) );
263#endif
264 }240 }
265 else241 else
266 {242 {
@@ -268,23 +244,13 @@
268 ScheduleBreak( object, function );244 ScheduleBreak( object, function );
269245
270 }246 }
271#else
272 // do it when you can without getting interrupted.
273 ScheduleBreak( object, function );
274#endif
275 }247 }
276248
277 //! schedule a task for execution in the next tToDo call249 //! schedule a task for execution in the next tToDo call
278 static void ScheduleForeground( T & object, void (T::*function)() )250 static void ScheduleForeground( T & object, void (T::*function)() )
279 {251 {
280#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD)
281 Pending().add( nMemberFunctionRunnerTemplate( object, function ) );252 Pending().add( nMemberFunctionRunnerTemplate( object, function ) );
282 st_ToDo( FinishAll );253 st_ToDo( FinishAll );
283#else
284 // execute it immedeately
285 (object.*function)();
286#endif
287
288 }254 }
289255
290 // function that calls tasks scheduled for the next break256 // function that calls tasks scheduled for the next break
@@ -314,25 +280,32 @@
314 // taks for the break280 // taks for the break
315 static std::deque< nMemberFunctionRunnerTemplate > pendingForBreak_;281 static std::deque< nMemberFunctionRunnerTemplate > pendingForBreak_;
316282
317#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD)283 typedef tLockedQueue< nMemberFunctionRunnerTemplate, boost::mutex > LockedQueue;
284
318 // queue of foreground tasks285 // queue of foreground tasks
319 static nQueue< nMemberFunctionRunnerTemplate, nMutex > & Pending()286 static LockedQueue & Pending()
320 {287 {
321 static nQueue< nMemberFunctionRunnerTemplate, nMutex > pending;288 static LockedQueue pending;
322 return pending;289 return pending;
323 }290 }
324291
325 // function that calls them292 // function that calls them
326 static void FinishAll()293 static void FinishAll()
327 {294 {
328 // finish all pending tasks295 try
329 while( Pending().size() > 0 )296 {
330 {297 // finish all pending tasks
331 nMemberFunctionRunnerTemplate next = Pending().next();298 while( Pending().size() > 0 )
332 next.run();299 {
300 nMemberFunctionRunnerTemplate next = Pending().next();
301 next.run();
302 }
303 }
304 catch( typename LockedQueue::Empty const & e )
305 {
306 // ignore, we just read over the end. No biggie.
333 }307 }
334 }308 }
335#endif
336};309};
337310
338template< class T >311template< class T >
@@ -369,7 +342,7 @@
369 {342 {
370 if ( block )343 if ( block )
371 {344 {
372#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD)345#ifdef HAVE_THREADS
373 ScheduleBackground( object, function );346 ScheduleBackground( object, function );
374#else347#else
375 ScheduleBreak( object, function );348 ScheduleBreak( object, function );
@@ -388,7 +361,7 @@
388 public nMachineDecorator, 361 public nMachineDecorator,
389 public nKrawall::nCheckResult,362 public nKrawall::nCheckResult,
390 public nKrawall::nPasswordCheckData,363 public nKrawall::nPasswordCheckData,
391 public tReferencable< nLoginProcess, nMutex >364 public tReferencable< nLoginProcess, boost::mutex >
392{365{
393 // reference counting pointer 366 // reference counting pointer
394 typedef tJUST_CONTROLLED_PTR< nLoginProcess > SelfPointer;367 typedef tJUST_CONTROLLED_PTR< nLoginProcess > SelfPointer;
@@ -400,9 +373,9 @@
400 // install self reference to keep this object alive373 // install self reference to keep this object alive
401 selfReference_ = this;374 selfReference_ = this;
402375
403 // inform the user about delays376 // inform the user about delays
404 bool delays = false;377 bool delays = true;
405#if defined(HAVE_LIBZTHREAD) || defined(HAVE_PTHREAD)378#ifdef HAVE_THREADS
406 delays = tRecorder::IsRunning();379 delays = tRecorder::IsRunning();
407#endif380#endif
408 if ( delays )381 if ( delays )
409382
=== removed file 'src/tools/pthread-binding.h'
--- src/tools/pthread-binding.h 2008-12-29 17:15:32 +0000
+++ src/tools/pthread-binding.h 1970-01-01 00:00:00 +0000
@@ -1,82 +0,0 @@
1#include <deque>
2#include <pthread.h>
3#include <stdexcept>
4
5class tPThreadMutex
6{
7private:
8 pthread_mutex_t mutex;
9public:
10 tPThreadMutex() {
11 // TODO: error checking
12 pthread_mutex_init(&mutex, NULL);
13 }
14 void acquire() {
15 pthread_mutex_lock(&mutex);
16 };
17 void release() {
18 pthread_mutex_unlock(&mutex);
19 };
20};
21
22class tPThreadRecursiveMutex
23 : public tPThreadMutex
24{
25private:
26 pthread_mutex_t mutex;
27public:
28 tPThreadRecursiveMutex() {
29 // TODO: error checking
30 pthread_mutexattr_t mta;
31
32 pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
33 pthread_mutex_init(&mutex, &mta);
34 }
35};
36
37template <class T>
38class tPThreadGuard
39{
40private:
41 T*mutex;
42public:
43 tPThreadGuard(T*m) {
44 mutex = m;
45 mutex->acquire();
46 };
47 ~tPThreadGuard() {
48 mutex->release();
49 };
50};
51
52template <class T, class MutexT>
53class tPThreadQueue
54{
55 MutexT mutex;
56 std::deque<T> q;
57public:
58 virtual void add(const T& item) {
59 tPThreadGuard<MutexT> mL(&mutex);
60
61 q.push_back(item);
62 }
63
64 virtual size_t size() {
65 tPThreadGuard<MutexT> mL(&mutex);
66
67 return q.size();
68 }
69
70 virtual T next() {
71 tPThreadGuard<MutexT> mL(&mutex);
72
73 if(q.size() == 0)
74 // TODO: throw a specific exception?
75 throw std::exception();
76
77 T item = q.front();
78 q.pop_front();
79
80 return item;
81 }
82};
830
=== modified file 'src/tools/tError.cpp'
--- src/tools/tError.cpp 2011-07-26 19:11:38 +0000
+++ src/tools/tError.cpp 2011-09-11 04:47:25 +0000
@@ -57,7 +57,7 @@
57{57{
58 std::cerr << caption << ": " << message << "\n";58 std::cerr << caption << ": " << message << "\n";
59 st_Breakpoint();59 st_Breakpoint();
60 static bool error = false; // to disable the error if it is inconvenient right now and you think it may not be fatal60 static bool error = true; // to disable the error if it is inconvenient right now and you think it may not be fatal
61 if ( error )61 if ( error )
62 {62 {
63 // throw 1; //tSimpleException( message, caption );63 // throw 1; //tSimpleException( message, caption );
6464
=== added file 'src/tools/tLockedQueue.h'
--- src/tools/tLockedQueue.h 1970-01-01 00:00:00 +0000
+++ src/tools/tLockedQueue.h 2011-09-11 04:47:25 +0000
@@ -0,0 +1,74 @@
1/*
2
3*************************************************************************
4
5ArmageTron -- Just another Tron Lightcycle Game in 3D.
6Copyright (C) 2011 Armagetron Advanced Development Team
7
8**************************************************************************
9
10This program is free software; you can redistribute it and/or
11modify it under the terms of the GNU General Public License
12as published by the Free Software Foundation; either version 2
13of the License, or (at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24***************************************************************************
25
26*/
27
28#ifndef ArmageTron_LOCKED_QUEUE_H
29#define ArmageTron_LOCKED_QUEUE_H
30
31#include "tMutex.h"
32
33#include <deque>
34
35//! thread safe queue
36template< typename T, typename MUTEX >
37class tLockedQueue
38{
39public:
40 //! exception thrown if next() is called on an empty queue
41 class Empty: public std::exception{};
42
43 void add(const T& item)
44 {
45 boost::lock_guard< MUTEX > lock(mutex_);
46
47 queue_.push_back(item);
48 }
49
50 virtual size_t size()
51 {
52 boost::lock_guard< MUTEX > lock(mutex_);
53
54 return queue_.size();
55 }
56
57 T next()
58 {
59 boost::lock_guard< MUTEX > lock(mutex_);
60
61 if(queue_.size() == 0)
62 throw Empty();
63
64 T item = queue_.front();
65 queue_.pop_front();
66
67 return item;
68 }
69private:
70 std::deque<T> queue_;
71 MUTEX mutex_;
72};
73
74#endif
075
=== modified file 'src/tools/tMemManager.cpp'
--- src/tools/tMemManager.cpp 2011-07-10 18:22:34 +0000
+++ src/tools/tMemManager.cpp 2011-09-11 04:47:25 +0000
@@ -88,23 +88,9 @@
8888
89static bool reported=false;89static bool reported=false;
9090
91#ifdef HAVE_LIBZTHREAD91#include "tMutex.h"
92#include <zthread/FastRecursiveMutex.h>92
9393static boost::recursive_mutex st_mutex;
94static ZThread::FastRecursiveMutex st_mutex;
95#elif defined(HAVE_PTHREAD)
96#include "pthread-binding.h"
97static tPThreadRecursiveMutex st_mutex;
98#else
99class tMockMutex
100{
101public:
102 void acquire(){}
103 void release(){}
104};
105
106static tMockMutex st_mutex;
107#endif
10894
109// create an object of this class while calling external functions95// create an object of this class while calling external functions
110// that are known to have (harmless!) leaks96// that are known to have (harmless!) leaks
@@ -122,15 +108,12 @@
122108
123class tBottleNeck109class tBottleNeck
124{110{
111private:
112 boost::lock_guard< boost::recursive_mutex > lock_;
125public:113public:
126 tBottleNeck()114 tBottleNeck()
127 {115 :lock_(st_mutex)
128 st_mutex.acquire();116 {
129 }
130
131 ~tBottleNeck()
132 {
133 st_mutex.release();
134 }117 }
135};118};
136119
@@ -644,9 +627,6 @@
644tMemManager::~tMemManager(){627tMemManager::~tMemManager(){
645#ifdef LEAKFINDER628#ifdef LEAKFINDER
646 static bool warn = true;629 static bool warn = true;
647#ifdef HAVE_LIBZTHREAD
648 warn = false;
649#endif
650630
651 if (inited){631 if (inited){
652 // l???sche das ding632 // l???sche das ding
@@ -1306,10 +1286,8 @@
1306 tAllocationInfo info( false );1286 tAllocationInfo info( false );
13071287
1308#ifdef LEAKFINDER1288#ifdef LEAKFINDER
1309#ifndef HAVE_LIBZTHREAD
1310 info.checksum = size;1289 info.checksum = size;
1311#endif1290#endif
1312#endif
1313 return tMemMan::Alloc(info, size);1291 return tMemMan::Alloc(info, size);
1314}1292}
13151293
@@ -1377,10 +1355,8 @@
1377void* operator new[] (size_t size) THROW_BADALLOC{1355void* operator new[] (size_t size) THROW_BADALLOC{
1378 tAllocationInfo info( true );1356 tAllocationInfo info( true );
1379#ifdef LEAKFINDER1357#ifdef LEAKFINDER
1380#ifndef HAVE_LIBZTHREAD
1381 info.checksum = size % MAXCHECKSUM;1358 info.checksum = size % MAXCHECKSUM;
1382#endif1359#endif
1383#endif
1384 return tMemMan::Alloc(info, size);1360 return tMemMan::Alloc(info, size);
1385}1361}
13861362
13871363
=== added file 'src/tools/tMutex.cpp'
--- src/tools/tMutex.cpp 1970-01-01 00:00:00 +0000
+++ src/tools/tMutex.cpp 2011-09-11 04:47:25 +0000
@@ -0,0 +1,82 @@
1/*
2
3*************************************************************************
4
5ArmageTron -- Just another Tron Lightcycle Game in 3D.
6Copyright (C) 2005 by
7the AA DevTeam (see the file AUTHORS(.txt) in the main source directory)
8
9**************************************************************************
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
25***************************************************************************
26
27*/
28
29#include "tMutex.h"
30
31#ifndef HAVE_LIBBOOST_THREAD
32
33namespace boost
34{
35 // special constructor, do not initialize mutex
36 mutex::mutex( int )
37 {
38 }
39
40 mutex::mutex()
41 {
42#ifdef HAVE_REAL_MUTEX
43 // TODO: error checking
44 pthread_mutex_init(&mutex_, NULL);
45#endif
46 }
47
48 mutex::~mutex()
49 {
50#ifdef HAVE_REAL_MUTEX
51 pthread_mutex_destroy(&mutex_);
52#endif
53 }
54
55 void mutex::lock()
56 {
57#ifdef HAVE_REAL_MUTEX
58 pthread_mutex_lock(&mutex_);
59#endif
60 }
61
62 void mutex::unlock()
63 {
64#ifdef HAVE_REAL_MUTEX
65 pthread_mutex_unlock(&mutex_);
66#endif
67 }
68
69 recursive_mutex::recursive_mutex()
70 : mutex(5)
71 {
72#ifdef HAVE_REAL_MUTEX
73 // TODO: error checking
74 pthread_mutexattr_t mta;
75
76 pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
77 pthread_mutex_init(&mutex_, &mta);
78#endif
79 }
80}
81
82#endif
083
=== added file 'src/tools/tMutex.h'
--- src/tools/tMutex.h 1970-01-01 00:00:00 +0000
+++ src/tools/tMutex.h 2011-09-11 04:47:25 +0000
@@ -0,0 +1,150 @@
1/*
2
3*************************************************************************
4
5ArmageTron -- Just another Tron Lightcycle Game in 3D.
6Copyright (C) 2011 Armagetron Advanced Development Team
7
8**************************************************************************
9
10This program is free software; you can redistribute it and/or
11modify it under the terms of the GNU General Public License
12as published by the Free Software Foundation; either version 2
13of the License, or (at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24***************************************************************************
25
26*/
27
28#ifndef ArmageTron_TMUTEX_H
29#define ArmageTron_TMUTEX_H
30
31#include "defs.h"
32
33#ifdef HAVE_LIBBOOST_THREAD
34
35#include <boost/thread/recursive_mutex.hpp>
36#include <boost/thread/mutex.hpp>
37#include <boost/thread/locks.hpp>
38
39#else // HAVE_LIBBOOST_THREAD
40
41namespace boost
42{
43// replicate the little we actually use with PThreads; for documentation, see boost.
44class mutex
45{
46private:
47 mutex( mutex const & );
48 mutex & operator = ( mutex const & );
49protected:
50#ifdef HAVE_PTHREAD
51#define HAVE_REAL_MUTEX
52 pthread_mutex_t mutex_;
53#endif
54
55 // special constructor, do not initialize mutex
56 explicit mutex( int );
57public:
58 mutex();
59 ~mutex();
60 void lock();
61 void unlock();
62};
63
64class recursive_mutex
65 : public mutex
66{
67public:
68 recursive_mutex();
69};
70
71template <class T>
72class lock_base
73{
74private:
75 T & mutex_;
76 lock_base( lock_base const & );
77 lock_base & operator = ( lock_base const & );
78protected:
79lock_base(T & m)
80 : mutex_(m)
81 {}
82
83 void lock_()
84 {
85 mutex_.lock();
86 };
87
88 void unlock_()
89 {
90 mutex_.unlock();
91 }
92};
93
94template <class T>
95class lock_guard: public lock_base<T>
96{
97public:
98 lock_guard(T & m)
99 : lock_base<T>(m)
100 {
101 this->lock_();
102 };
103
104 ~lock_guard()
105 {
106 this->unlock_();
107 };
108};
109
110template <class T>
111class unique_lock: public lock_base<T>
112{
113private:
114 bool locked_;
115public:
116 unique_lock(T & m)
117 : lock_base<T>(m), locked_(false)
118 {
119 this->lock();
120 };
121
122 ~unique_lock()
123 {
124 this->unlock();
125 };
126
127 void lock()
128 {
129 if( !locked_ )
130 {
131 locked_ = true;
132 this->lock_();
133 }
134 }
135
136 void unlock()
137 {
138 if( locked_ )
139 {
140 locked_ = false;
141 this->unlock_();
142 }
143 }
144};
145
146}
147
148#endif // HAVE_LIBBOOST_THREAD
149
150#endif
0151
=== modified file 'src/tools/tSafePTR.h'
--- src/tools/tSafePTR.h 2011-08-25 11:47:18 +0000
+++ src/tools/tSafePTR.h 2011-09-11 04:47:25 +0000
@@ -36,6 +36,8 @@
3636
37#include "tError.h"37#include "tError.h"
3838
39#include "tMutex.h"
40
39class tCheckedPTRBase{41class tCheckedPTRBase{
40 friend class tPTRList;42 friend class tPTRList;
41 int id;43 int id;
@@ -424,8 +426,8 @@
424// not thread-safe mutex426// not thread-safe mutex
425struct tNonMutex427struct tNonMutex
426{428{
427 void acquire(){}429 void lock(){}
428 void release(){}430 void unlock(){}
429};431};
430432
431template< class T, class MUTEX = tNonMutex > class tReferencable433template< class T, class MUTEX = tNonMutex > class tReferencable
@@ -443,9 +445,8 @@
443 st_AddRefBreakpint( this );445 st_AddRefBreakpint( this );
444#endif 446#endif
445 tASSERT( this && refCtr_ >= 0 );447 tASSERT( this && refCtr_ >= 0 );
446 mutex_.acquire();448 boost::lock_guard< MUTEX > lock( mutex_ );
447 ++refCtr_;449 ++refCtr_;
448 mutex_.release();
449 tASSERT( this && refCtr_ >= 0 );450 tASSERT( this && refCtr_ >= 0 );
450 }451 }
451452
@@ -456,14 +457,13 @@
456#endif 457#endif
457458
458 tASSERT ( this && refCtr_ >= 0 );459 tASSERT ( this && refCtr_ >= 0 );
459 mutex_.acquire();460 boost::unique_lock< MUTEX > lock( mutex_ );
460 --refCtr_;461 --refCtr_;
461 bool kill = (refCtr_ <= 0);
462 mutex_.release();
463462
464 if ( kill )463 if ( refCtr_ <= 0 )
465 {464 {
466 refCtr_ = -1000;465 refCtr_ = -1000;
466 lock.unlock();
467 delete static_cast< const T* >( this );467 delete static_cast< const T* >( this );
468 }468 }
469 }469 }
470470
=== added file 'src/tools/tThread.h'
--- src/tools/tThread.h 1970-01-01 00:00:00 +0000
+++ src/tools/tThread.h 2011-09-11 04:47:25 +0000
@@ -0,0 +1,105 @@
1/*
2
3*************************************************************************
4
5ArmageTron -- Just another Tron Lightcycle Game in 3D.
6Copyright (C) 2011 Armagetron Advanced Development Team
7
8**************************************************************************
9
10This program is free software; you can redistribute it and/or
11modify it under the terms of the GNU General Public License
12as published by the Free Software Foundation; either version 2
13of the License, or (at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24***************************************************************************
25
26*/
27
28#ifndef ArmageTron_THREAD_H
29#define ArmageTron_THREAD_H
30
31#include "defs.h"
32
33#ifdef HAVE_LIBBOOST_THREAD
34
35#include <boost/thread/thread.hpp>
36
37#define HAVE_THREADS
38
39#else // HAVE_LIBBOOST_THREAD
40
41#ifdef HAVE_PTHREAD
42
43#define HAVE_THREADS
44
45#include <pthread.h>
46
47// replicate the little we actually use with PThreads
48namespace boost
49{
50class thread
51{
52public:
53 template< class T>
54 thread( T const & t )
55 {
56 // we don't currently hang on to thread objects, so no need to store handles
57 pthread_t thread;
58
59 // make a copy of the object to call
60 T * o = new T(t);
61
62 pthread_create(&thread, NULL, &run<T>, (void*) o);
63 }
64private:
65 // worker function
66 template< class T >
67 static void * run( void * o )
68 {
69 T * t = static_cast< T * >(o);
70
71 // do the actual call
72 (*t)();
73
74 // clean up
75 delete t;
76
77 return NULL;
78 }
79};
80}
81
82#else // HAVE_LIBPTHREAD
83
84#include "tError.h"
85
86// replicate the little we actually use with PThreads
87namespace boost
88{
89class thread
90{
91public:
92 template< class T>
93 thread( T const & t )
94 {
95 // should never be called, then
96 tVERIFY(0);
97 }
98};
99}
100
101#endif // HAVE_LIBPTHREAD
102
103#endif // HAVE_LIBBOOST_THREAD
104
105#endif
0106
=== modified file 'src/tools/tToDo.cpp'
--- src/tools/tToDo.cpp 2011-07-10 18:22:34 +0000
+++ src/tools/tToDo.cpp 2011-09-11 04:47:25 +0000
@@ -28,37 +28,24 @@
28#include "tToDo.h"28#include "tToDo.h"
29#include "tArray.h"29#include "tArray.h"
3030
31#ifdef HAVE_LIBZTHREAD31#include "tMutex.h"
32#include <zthread/FastRecursiveMutex.h>32
3333static boost::recursive_mutex st_mutex;
34static ZThread::FastRecursiveMutex st_mutex;
35#elif defined(HAVE_PTHREAD)
36#include "pthread-binding.h"
37static tPThreadRecursiveMutex st_mutex;
38#else
39class tMockMutex
40{
41public:
42 void acquire(){}
43 void release(){}
44};
45
46static tMockMutex st_mutex;
47#endif
4834
49tArray<tTODO_FUNC *> tToDos;35tArray<tTODO_FUNC *> tToDos;
5036
51void st_ToDo(tTODO_FUNC *td){ // postpone something37void st_ToDo(tTODO_FUNC *td){ // postpone something
52 st_mutex.acquire();38 boost::lock_guard< boost::recursive_mutex > lock( st_mutex );
39
53 tToDos[tToDos.Len()]=td;40 tToDos[tToDos.Len()]=td;
54 st_mutex.release();
55}41}
5642
57// the function currently in execution43// the function currently in execution
58static tTODO_FUNC * st_toDoCurrent = 0;44static tTODO_FUNC * st_toDoCurrent = 0;
5945
60void st_ToDoOnce(tTODO_FUNC *td){ // postpone something, avoid double entries46void st_ToDoOnce(tTODO_FUNC *td){ // postpone something, avoid double entries
61 st_mutex.acquire();47 boost::lock_guard< boost::recursive_mutex > lock( st_mutex );
48
62 if( st_toDoCurrent == td )49 if( st_toDoCurrent == td )
63 {50 {
64 return;51 return;
@@ -71,7 +58,6 @@
71 }58 }
72 }59 }
73 tToDos[tToDos.Len()]=td;60 tToDos[tToDos.Len()]=td;
74 st_mutex.release();
75}61}
7662
77// a lone (but relatively safe) function pointer for things to do triggered by signals.63// a lone (but relatively safe) function pointer for things to do triggered by signals.
@@ -83,7 +69,7 @@
83 st_ToDo( st_toDoFromSignal );69 st_ToDo( st_toDoFromSignal );
84 st_toDoFromSignal = 0;70 st_toDoFromSignal = 0;
85 }71 }
86 st_mutex.acquire();72 boost::lock_guard< boost::recursive_mutex > lock( st_mutex );
87 while (tToDos.Len()){73 while (tToDos.Len()){
88 tTODO_FUNC *last = st_toDoCurrent;74 tTODO_FUNC *last = st_toDoCurrent;
89 tTODO_FUNC *td = tToDos[tToDos.Len()-1];75 tTODO_FUNC *td = tToDos[tToDos.Len()-1];
@@ -92,7 +78,6 @@
92 (*td)();78 (*td)();
93 st_toDoCurrent = last;79 st_toDoCurrent = last;
94 }80 }
95 st_mutex.release();
96}81}
9782
98void st_ToDo_Signal(tTODO_FUNC *td){ // postpone something83void st_ToDo_Signal(tTODO_FUNC *td){ // postpone something
9984
=== modified file 'src/win32/config_common.h'
--- src/win32/config_common.h 2011-07-30 23:11:58 +0000
+++ src/win32/config_common.h 2011-09-11 04:47:25 +0000
@@ -11,6 +11,10 @@
11// is now defined for code::blocks > 8 or so11// is now defined for code::blocks > 8 or so
12#define HAVE_ISBLANK12#define HAVE_ISBLANK
1313
14// this one is included in winlibs as static library
15#define HAVE_LIBBOOST_THREAD
16#define BOOST_THREAD_USE_LIB
17
14// and disable warnings about those calls that can't be converted. We may want to look at18// and disable warnings about those calls that can't be converted. We may want to look at
15// them later, though.19// them later, though.
16#define _CRT_SECURE_NO_DEPRECATE 120#define _CRT_SECURE_NO_DEPRECATE 1
1721
=== modified file 'src/win32_ded/aa_config.h'
--- src/win32_ded/aa_config.h 2011-07-30 23:11:58 +0000
+++ src/win32_ded/aa_config.h 2011-09-11 04:47:25 +0000
@@ -7,7 +7,6 @@
7#define DEDICATED 17#define DEDICATED 1
88
9// activate armathentication support9// activate armathentication support
10#define HAVE_LIBZTHREAD 1
11#define KRAWALL_SERVER 110#define KRAWALL_SERVER 1
1211
13// include common Windows header12// include common Windows header
1413
=== modified file 'win32/code_blocks/ArmagetronAd.cbp'
--- win32/code_blocks/ArmagetronAd.cbp 2011-08-10 12:53:41 +0000
+++ win32/code_blocks/ArmagetronAd.cbp 2011-09-11 04:47:25 +0000
@@ -26,7 +26,7 @@
26 <Add library="..\..\..\winlibs\build\dist\SDL.dll" />26 <Add library="..\..\..\winlibs\build\dist\SDL.dll" />
27 <Add library="..\..\..\winlibs\build\dist\FTGL.dll" />27 <Add library="..\..\..\winlibs\build\dist\FTGL.dll" />
28 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />28 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />
29 <Add library="..\..\..\winlibs\build\dist\libZThread.a" />29 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-1_47.a" />
30 </Linker>30 </Linker>
31 </Target>31 </Target>
32 <Target title="Win32 Debug">32 <Target title="Win32 Debug">
@@ -47,7 +47,7 @@
47 <Add library="..\..\..\winlibs\build\debug\SDL.dll" />47 <Add library="..\..\..\winlibs\build\debug\SDL.dll" />
48 <Add library="..\..\..\winlibs\build\debug\FTGL.dll" />48 <Add library="..\..\..\winlibs\build\debug\FTGL.dll" />
49 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />49 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />
50 <Add library="..\..\..\winlibs\build\debug\libZThread.a" />50 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-d-1_47.a" />
51 </Linker>51 </Linker>
52 </Target>52 </Target>
53 </Build>53 </Build>
@@ -90,7 +90,6 @@
90 <Add directory="..\..\..\winlibs\FTGL\win32\freetype\include\freetype2" />90 <Add directory="..\..\..\winlibs\FTGL\win32\freetype\include\freetype2" />
91 <Add directory="..\..\..\winlibs\boost\includes" />91 <Add directory="..\..\..\winlibs\boost\includes" />
92 <Add directory="..\..\src\thirdparty\scrap" />92 <Add directory="..\..\src\thirdparty\scrap" />
93 <Add directory="..\..\..\winlibs\ZThread\include" />
94 <Add directory="..\..\..\winlibs\protobuf\src" />93 <Add directory="..\..\..\winlibs\protobuf\src" />
95 <Add directory="..\..\src\protobuf" />94 <Add directory="..\..\src\protobuf" />
96 <Add directory="..\..\src\thirdparty\utf8" />95 <Add directory="..\..\src\thirdparty\utf8" />
@@ -463,6 +462,8 @@
463 <Unit filename="..\..\src\tools\tMemManager.h" />462 <Unit filename="..\..\src\tools\tMemManager.h" />
464 <Unit filename="..\..\src\tools\tMemStack.cpp" />463 <Unit filename="..\..\src\tools\tMemStack.cpp" />
465 <Unit filename="..\..\src\tools\tMemStack.h" />464 <Unit filename="..\..\src\tools\tMemStack.h" />
465 <Unit filename="..\..\src\tools\tMutex.cpp" />
466 <Unit filename="..\..\src\tools\tMutex.h" />
466 <Unit filename="..\..\src\tools\tPlayList.cpp" />467 <Unit filename="..\..\src\tools\tPlayList.cpp" />
467 <Unit filename="..\..\src\tools\tPlayList.h" />468 <Unit filename="..\..\src\tools\tPlayList.h" />
468 <Unit filename="..\..\src\tools\tPolynomial.cpp" />469 <Unit filename="..\..\src\tools\tPolynomial.cpp" />
@@ -498,6 +499,7 @@
498 <Unit filename="..\..\src\tools\tString.h" />499 <Unit filename="..\..\src\tools\tString.h" />
499 <Unit filename="..\..\src\tools\tSysTime.cpp" />500 <Unit filename="..\..\src\tools\tSysTime.cpp" />
500 <Unit filename="..\..\src\tools\tSysTime.h" />501 <Unit filename="..\..\src\tools\tSysTime.h" />
502 <Unit filename="..\..\src\tools\tThread.h" />
501 <Unit filename="..\..\src\tools\tToDo.cpp" />503 <Unit filename="..\..\src\tools\tToDo.cpp" />
502 <Unit filename="..\..\src\tools\tToDo.h" />504 <Unit filename="..\..\src\tools\tToDo.h" />
503 <Unit filename="..\..\src\tools\tValue.h" />505 <Unit filename="..\..\src\tools\tValue.h" />
504506
=== modified file 'win32/code_blocks/ArmagetronAd.workspace'
--- win32/code_blocks/ArmagetronAd.workspace 2011-08-10 12:53:41 +0000
+++ win32/code_blocks/ArmagetronAd.workspace 2011-09-11 04:47:25 +0000
@@ -1,9 +1,8 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>1<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2<CodeBlocks_workspace_file>2<CodeBlocks_workspace_file>
3 <Workspace title="Armagetron Advanced workspace">3 <Workspace title="Armagetron Advanced workspace">
4 <Project filename="../../../winlibs/win32/code_blocks/ZThread.cbp" active="1" />
5 <Project filename="../../../winlibs/protobuf/vsprojects/libprotobuf.cbp" />4 <Project filename="../../../winlibs/protobuf/vsprojects/libprotobuf.cbp" />
6 <Project filename="Dedicated.cbp" />5 <Project filename="Dedicated.cbp" active="1" />
7 <Project filename="Master.cbp" />6 <Project filename="Master.cbp" />
8 <Project filename="../../../winlibs/win32/code_blocks/SDL.cbp" />7 <Project filename="../../../winlibs/win32/code_blocks/SDL.cbp" />
9 <Project filename="../../../winlibs/win32/code_blocks/SDL_image.cbp" />8 <Project filename="../../../winlibs/win32/code_blocks/SDL_image.cbp" />
109
=== modified file 'win32/code_blocks/Dedicated.cbp'
--- win32/code_blocks/Dedicated.cbp 2011-08-10 12:53:41 +0000
+++ win32/code_blocks/Dedicated.cbp 2011-09-11 04:47:25 +0000
@@ -20,8 +20,8 @@
20 </Compiler>20 </Compiler>
21 <Linker>21 <Linker>
22 <Add option="-s" />22 <Add option="-s" />
23 <Add library="..\..\..\winlibs\build\dist\libZThread.a" />
24 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />23 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />
24 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-1_47.a" />
25 </Linker>25 </Linker>
26 </Target>26 </Target>
27 <Target title="Win32 Debug">27 <Target title="Win32 Debug">
@@ -38,8 +38,8 @@
38 <Add option="-DDEBUG" />38 <Add option="-DDEBUG" />
39 </Compiler>39 </Compiler>
40 <Linker>40 <Linker>
41 <Add library="..\..\..\winlibs\build\debug\libZThread.a" />
42 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />41 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />
42 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-d-1_47.a" />
43 </Linker>43 </Linker>
44 </Target>44 </Target>
45 </Build>45 </Build>
@@ -71,7 +71,6 @@
71 <Add directory="..\..\..\winlibs\iconv\include" />71 <Add directory="..\..\..\winlibs\iconv\include" />
72 <Add directory="..\..\..\winlibs\boost\includes" />72 <Add directory="..\..\..\winlibs\boost\includes" />
73 <Add directory="..\..\src\resource" />73 <Add directory="..\..\src\resource" />
74 <Add directory="..\..\..\winlibs\ZThread\include" />
75 <Add directory="..\..\src\protobuf" />74 <Add directory="..\..\src\protobuf" />
76 <Add directory="..\..\..\winlibs\protobuf\src" />75 <Add directory="..\..\..\winlibs\protobuf\src" />
77 <Add directory="..\..\src\thirdparty\utf8" />76 <Add directory="..\..\src\thirdparty\utf8" />
@@ -370,6 +369,8 @@
370 <Unit filename="..\..\src\tools\tMemManager.h" />369 <Unit filename="..\..\src\tools\tMemManager.h" />
371 <Unit filename="..\..\src\tools\tMemStack.cpp" />370 <Unit filename="..\..\src\tools\tMemStack.cpp" />
372 <Unit filename="..\..\src\tools\tMemStack.h" />371 <Unit filename="..\..\src\tools\tMemStack.h" />
372 <Unit filename="..\..\src\tools\tMutex.cpp" />
373 <Unit filename="..\..\src\tools\tMutex.h" />
373 <Unit filename="..\..\src\tools\tPlayList.cpp" />374 <Unit filename="..\..\src\tools\tPlayList.cpp" />
374 <Unit filename="..\..\src\tools\tPlayList.h" />375 <Unit filename="..\..\src\tools\tPlayList.h" />
375 <Unit filename="..\..\src\tools\tPolynomial.cpp" />376 <Unit filename="..\..\src\tools\tPolynomial.cpp" />
@@ -400,6 +401,7 @@
400 <Unit filename="..\..\src\tools\tString.h" />401 <Unit filename="..\..\src\tools\tString.h" />
401 <Unit filename="..\..\src\tools\tSysTime.cpp" />402 <Unit filename="..\..\src\tools\tSysTime.cpp" />
402 <Unit filename="..\..\src\tools\tSysTime.h" />403 <Unit filename="..\..\src\tools\tSysTime.h" />
404 <Unit filename="..\..\src\tools\tThread.h" />
403 <Unit filename="..\..\src\tools\tToDo.cpp" />405 <Unit filename="..\..\src\tools\tToDo.cpp" />
404 <Unit filename="..\..\src\tools\tToDo.h" />406 <Unit filename="..\..\src\tools\tToDo.h" />
405 <Unit filename="..\..\src\tools\tVersion.cpp" />407 <Unit filename="..\..\src\tools\tVersion.cpp" />
406408
=== modified file 'win32/code_blocks/Master.cbp'
--- win32/code_blocks/Master.cbp 2011-08-10 12:53:41 +0000
+++ win32/code_blocks/Master.cbp 2011-09-11 04:47:25 +0000
@@ -20,8 +20,8 @@
20 </Compiler>20 </Compiler>
21 <Linker>21 <Linker>
22 <Add option="-s" />22 <Add option="-s" />
23 <Add library="..\..\..\winlibs\build\dist\libZThread.a" />
24 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />23 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf.a" />
24 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-1_47.a" />
25 </Linker>25 </Linker>
26 </Target>26 </Target>
27 <Target title="Win32 Debug">27 <Target title="Win32 Debug">
@@ -38,8 +38,8 @@
38 <Add option="-DDEBUG" />38 <Add option="-DDEBUG" />
39 </Compiler>39 </Compiler>
40 <Linker>40 <Linker>
41 <Add library="..\..\..\winlibs\build\debug\libZThread.a" />
42 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />41 <Add library="..\..\..\winlibs\protobuf\vsprojects\libprotobuf_debug.a" />
42 <Add library="..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-d-1_47.a" />
43 </Linker>43 </Linker>
44 </Target>44 </Target>
45 </Build>45 </Build>
@@ -59,7 +59,6 @@
59 <Add directory="..\..\src\tools" />59 <Add directory="..\..\src\tools" />
60 <Add directory="..\..\src\ui" />60 <Add directory="..\..\src\ui" />
61 <Add directory="..\..\src\win32_ded" />61 <Add directory="..\..\src\win32_ded" />
62 <Add directory="..\..\..\winlibs\ZThread\include" />
63 <Add directory="..\..\..\winlibs\libxml2\include" />62 <Add directory="..\..\..\winlibs\libxml2\include" />
64 <Add directory="..\..\src\resource" />63 <Add directory="..\..\src\resource" />
65 <Add directory="..\..\..\winlibs\boost\includes" />64 <Add directory="..\..\..\winlibs\boost\includes" />
@@ -269,6 +268,8 @@
269 <Unit filename="..\..\src\tools\tMemManager.h" />268 <Unit filename="..\..\src\tools\tMemManager.h" />
270 <Unit filename="..\..\src\tools\tMemStack.cpp" />269 <Unit filename="..\..\src\tools\tMemStack.cpp" />
271 <Unit filename="..\..\src\tools\tMemStack.h" />270 <Unit filename="..\..\src\tools\tMemStack.h" />
271 <Unit filename="..\..\src\tools\tMutex.cpp" />
272 <Unit filename="..\..\src\tools\tMutex.h" />
272 <Unit filename="..\..\src\tools\tRandom.cpp" />273 <Unit filename="..\..\src\tools\tRandom.cpp" />
273 <Unit filename="..\..\src\tools\tRandom.h" />274 <Unit filename="..\..\src\tools\tRandom.h" />
274 <Unit filename="..\..\src\tools\tRecorder.cpp" />275 <Unit filename="..\..\src\tools\tRecorder.cpp" />
@@ -284,6 +285,7 @@
284 <Unit filename="..\..\src\tools\tString.h" />285 <Unit filename="..\..\src\tools\tString.h" />
285 <Unit filename="..\..\src\tools\tSysTime.cpp" />286 <Unit filename="..\..\src\tools\tSysTime.cpp" />
286 <Unit filename="..\..\src\tools\tSysTime.h" />287 <Unit filename="..\..\src\tools\tSysTime.h" />
288 <Unit filename="..\..\src\tools\tThread.h" />
287 <Unit filename="..\..\src\tools\tToDo.cpp" />289 <Unit filename="..\..\src\tools\tToDo.cpp" />
288 <Unit filename="..\..\src\tools\tToDo.h" />290 <Unit filename="..\..\src\tools\tToDo.h" />
289 <Unit filename="..\..\src\tools\tVersion.cpp" />291 <Unit filename="..\..\src\tools\tVersion.cpp" />

Subscribers

People subscribed via source and target branches

to status/vote changes: