Browse Source

move threading/pipelining stuff into new directory, reorganize in general

David Rose 20 years ago
parent
commit
91efb72ca7
100 changed files with 394 additions and 305 deletions
  1. 1 1
      panda/metalibs/panda/Sources.pp
  2. 1 1
      panda/metalibs/pandaexpress/Sources.pp
  3. 23 160
      panda/src/express/Sources.pp
  4. 1 32
      panda/src/express/config_express.cxx
  5. 0 6
      panda/src/express/config_express.h
  6. 5 24
      panda/src/express/express_composite1.cxx
  7. 0 18
      panda/src/express/express_composite2.cxx
  8. 10 10
      panda/src/express/memoryUsage.cxx
  9. 4 4
      panda/src/express/profileTimer.I
  10. 15 15
      panda/src/express/trueClock.I
  11. 3 3
      panda/src/express/trueClock.h
  12. 159 0
      panda/src/pipeline/Sources.pp
  13. 0 0
      panda/src/pipeline/atomicAdjust.I
  14. 0 0
      panda/src/pipeline/atomicAdjust.cxx
  15. 1 1
      panda/src/pipeline/atomicAdjust.h
  16. 0 0
      panda/src/pipeline/atomicAdjustDummyImpl.I
  17. 0 0
      panda/src/pipeline/atomicAdjustDummyImpl.cxx
  18. 1 1
      panda/src/pipeline/atomicAdjustDummyImpl.h
  19. 0 0
      panda/src/pipeline/atomicAdjustImpl.h
  20. 0 0
      panda/src/pipeline/atomicAdjustNsprImpl.I
  21. 0 0
      panda/src/pipeline/atomicAdjustNsprImpl.cxx
  22. 1 1
      panda/src/pipeline/atomicAdjustNsprImpl.h
  23. 0 0
      panda/src/pipeline/atomicAdjustPosixImpl.I
  24. 0 0
      panda/src/pipeline/atomicAdjustPosixImpl.cxx
  25. 1 1
      panda/src/pipeline/atomicAdjustPosixImpl.h
  26. 0 0
      panda/src/pipeline/atomicAdjustWin32Impl.I
  27. 0 0
      panda/src/pipeline/atomicAdjustWin32Impl.cxx
  28. 1 1
      panda/src/pipeline/atomicAdjustWin32Impl.h
  29. 0 0
      panda/src/pipeline/conditionVar.I
  30. 0 0
      panda/src/pipeline/conditionVar.cxx
  31. 2 2
      panda/src/pipeline/conditionVar.h
  32. 0 0
      panda/src/pipeline/conditionVarDebug.I
  33. 0 0
      panda/src/pipeline/conditionVarDebug.cxx
  34. 1 1
      panda/src/pipeline/conditionVarDebug.h
  35. 0 0
      panda/src/pipeline/conditionVarDirect.I
  36. 0 0
      panda/src/pipeline/conditionVarDirect.cxx
  37. 1 1
      panda/src/pipeline/conditionVarDirect.h
  38. 0 0
      panda/src/pipeline/conditionVarDummyImpl.I
  39. 0 0
      panda/src/pipeline/conditionVarDummyImpl.cxx
  40. 1 1
      panda/src/pipeline/conditionVarDummyImpl.h
  41. 0 0
      panda/src/pipeline/conditionVarImpl.h
  42. 0 0
      panda/src/pipeline/conditionVarNsprImpl.I
  43. 0 0
      panda/src/pipeline/conditionVarNsprImpl.cxx
  44. 1 1
      panda/src/pipeline/conditionVarNsprImpl.h
  45. 0 0
      panda/src/pipeline/conditionVarPosixImpl.I
  46. 0 0
      panda/src/pipeline/conditionVarPosixImpl.cxx
  47. 1 1
      panda/src/pipeline/conditionVarPosixImpl.h
  48. 0 0
      panda/src/pipeline/conditionVarWin32Impl.I
  49. 0 0
      panda/src/pipeline/conditionVarWin32Impl.cxx
  50. 1 1
      panda/src/pipeline/conditionVarWin32Impl.h
  51. 61 0
      panda/src/pipeline/config_pipeline.cxx
  52. 33 0
      panda/src/pipeline/config_pipeline.h
  53. 0 0
      panda/src/pipeline/cycleData.I
  54. 0 0
      panda/src/pipeline/cycleData.cxx
  55. 2 2
      panda/src/pipeline/cycleData.h
  56. 0 0
      panda/src/pipeline/cycleDataReader.I
  57. 0 0
      panda/src/pipeline/cycleDataReader.cxx
  58. 0 0
      panda/src/pipeline/cycleDataReader.h
  59. 0 0
      panda/src/pipeline/cycleDataStageReader.I
  60. 0 0
      panda/src/pipeline/cycleDataStageReader.cxx
  61. 0 0
      panda/src/pipeline/cycleDataStageReader.h
  62. 0 0
      panda/src/pipeline/cycleDataStageWriter.I
  63. 0 0
      panda/src/pipeline/cycleDataStageWriter.cxx
  64. 0 0
      panda/src/pipeline/cycleDataStageWriter.h
  65. 0 0
      panda/src/pipeline/cycleDataWriter.I
  66. 0 0
      panda/src/pipeline/cycleDataWriter.cxx
  67. 0 0
      panda/src/pipeline/cycleDataWriter.h
  68. 0 0
      panda/src/pipeline/cyclerHolder.I
  69. 0 0
      panda/src/pipeline/cyclerHolder.cxx
  70. 1 1
      panda/src/pipeline/cyclerHolder.h
  71. 0 0
      panda/src/pipeline/externalThread.cxx
  72. 1 1
      panda/src/pipeline/externalThread.h
  73. 0 0
      panda/src/pipeline/mainThread.cxx
  74. 1 1
      panda/src/pipeline/mainThread.h
  75. 0 0
      panda/src/pipeline/mutexDebug.I
  76. 45 3
      panda/src/pipeline/mutexDebug.cxx
  77. 6 1
      panda/src/pipeline/mutexDebug.h
  78. 0 0
      panda/src/pipeline/mutexDirect.I
  79. 0 0
      panda/src/pipeline/mutexDirect.cxx
  80. 1 1
      panda/src/pipeline/mutexDirect.h
  81. 0 0
      panda/src/pipeline/mutexHolder.I
  82. 0 0
      panda/src/pipeline/mutexHolder.cxx
  83. 1 1
      panda/src/pipeline/mutexHolder.h
  84. 0 0
      panda/src/pipeline/pipeline.I
  85. 2 2
      panda/src/pipeline/pipeline.cxx
  86. 1 1
      panda/src/pipeline/pipeline.h
  87. 0 0
      panda/src/pipeline/pipelineCycler.I
  88. 0 0
      panda/src/pipeline/pipelineCycler.cxx
  89. 0 0
      panda/src/pipeline/pipelineCycler.h
  90. 0 0
      panda/src/pipeline/pipelineCyclerBase.h
  91. 0 0
      panda/src/pipeline/pipelineCyclerDummyImpl.I
  92. 0 0
      panda/src/pipeline/pipelineCyclerDummyImpl.cxx
  93. 1 1
      panda/src/pipeline/pipelineCyclerDummyImpl.h
  94. 0 0
      panda/src/pipeline/pipelineCyclerLinks.I
  95. 1 1
      panda/src/pipeline/pipelineCyclerLinks.h
  96. 0 0
      panda/src/pipeline/pipelineCyclerTrivialImpl.I
  97. 0 0
      panda/src/pipeline/pipelineCyclerTrivialImpl.cxx
  98. 1 1
      panda/src/pipeline/pipelineCyclerTrivialImpl.h
  99. 0 0
      panda/src/pipeline/pipelineCyclerTrueImpl.I
  100. 1 1
      panda/src/pipeline/pipelineCyclerTrueImpl.cxx

+ 1 - 1
panda/metalibs/panda/Sources.pp

@@ -9,7 +9,7 @@
 #define USE_PACKAGES net
 
 #define COMPONENT_LIBS \
-    recorder pgraph \
+    recorder pgraph pipeline \
     pvrpn grutil chan pstatclient \
     char chat collide cull device \
     dgraph display event gobj graph gsgbase \

+ 1 - 1
panda/metalibs/pandaexpress/Sources.pp

@@ -8,7 +8,7 @@
 #define BUILDING_DLL BUILDING_PANDAEXPRESS
 #define USE_PACKAGES net
 
-#define COMPONENT_LIBS downloader ipc express pandabase
+#define COMPONENT_LIBS downloader express pandabase
 #define OTHER_LIBS dconfig:c prc:c interrogatedb:c dtoolutil:c dtoolbase:c dtoolconfig:m dtool:m
 
 #begin metalib_target

+ 23 - 160
panda/src/express/Sources.pp

@@ -9,63 +9,31 @@
   #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx
 
   #define SOURCES \
-    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
-    atomicAdjust.I atomicAdjustImpl.h \
-    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
-    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
-    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
     bigEndian.h buffer.I buffer.h \
     checksumHashGenerator.I checksumHashGenerator.h circBuffer.I \
-    circBuffer.h clockObject.I clockObject.h \
-    conditionVar.h conditionVar.I \
-    conditionVarDebug.h conditionVarDebug.I \
-    conditionVarDirect.h conditionVarDirect.I \
-    conditionVarDummyImpl.h conditionVarDummyImpl.I \
-    conditionVarImpl.h \
-    conditionVarNsprImpl.h conditionVarNsprImpl.I \
-    conditionVarPosixImpl.h conditionVarPosixImpl.I \
-    conditionVarWin32Impl.h conditionVarWin32Impl.I \
+    circBuffer.h \
     config_express.h \
-    cycleData.h cycleData.I \
-    cycleDataReader.h cycleDataReader.I \
-    cycleDataStageReader.h cycleDataStageReader.I \
-    cycleDataStageWriter.h cycleDataStageWriter.I \
-    cycleDataWriter.h cycleDataWriter.I \
-    cyclerHolder.h cyclerHolder.I \
     datagram.I datagram.h datagramGenerator.I \
     datagramGenerator.h \
     datagramIterator.I datagramIterator.h datagramSink.I datagramSink.h \
     dcast.T dcast.h \
     encryptStreamBuf.h encryptStreamBuf.I encryptStream.h encryptStream.I \
     error_utils.h \
-    externalThread.h \
     hashGeneratorBase.I hashGeneratorBase.h \
     hashVal.I hashVal.h \
     indirectLess.I indirectLess.h \
     littleEndian.h \
-    mainThread.h \
     memoryInfo.I memoryInfo.h \
     memoryUsage.I memoryUsage.h \
     memoryUsagePointerCounts.I memoryUsagePointerCounts.h \
     memoryUsagePointers.I memoryUsagePointers.h \
     multifile.I multifile.h \
-    mutexDebug.h mutexDebug.I \
-    mutexDirect.h mutexDirect.I \
-    mutexHolder.h mutexHolder.I \
     namable.I \
     namable.h nativeNumericData.I nativeNumericData.h \
     numeric_types.h \
     ordered_vector.h ordered_vector.I ordered_vector.T \
     password_hash.h \
     patchfile.I patchfile.h \
-    pipeline.h pipeline.I \
-    pipelineCycler.h pipelineCycler.I \
-    pipelineCyclerLinks.h pipelineCyclerLinks.I \
-    pipelineCyclerBase.h  \
-    pipelineCyclerDummyImpl.h pipelineCyclerDummyImpl.I \
-    pipelineCyclerTrivialImpl.h pipelineCyclerTrivialImpl.I \
-    pipelineCyclerTrueImpl.h pipelineCyclerTrueImpl.I \
-    pmutex.h pmutex.I \
     pointerTo.I pointerTo.h \
     pointerToArray.I pointerToArray.h \
     pointerToBase.I pointerToBase.h \
@@ -74,19 +42,11 @@
     pta_uchar.h \
     ramfile.I ramfile.h \
     referenceCount.I referenceCount.h \
-    reMutex.I reMutex.h \
-    reMutexDirect.h reMutexDirect.I \
-    reMutexHolder.I reMutexHolder.h \
     reversedNumericData.I reversedNumericData.h \
     streamReader.I streamReader.h streamWriter.I streamWriter.h \
     stringDecoder.h stringDecoder.I \
     subStream.I subStream.h subStreamBuf.h \
     textEncoder.h textEncoder.I \
-    threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
-    threadNsprImpl.h threadNsprImpl.I \
-    threadPosixImpl.h threadPosixImpl.I \
-    threadWin32Impl.h threadWin32Impl.I \
-    threadPriority.h \
     tokenBoard.I \
     tokenBoard.h trueClock.I trueClock.h \
     typedReferenceCount.I typedReferenceCount.h typedef.h \
@@ -106,44 +66,16 @@
     zStream.I zStream.h zStreamBuf.h
 
   #define INCLUDED_SOURCES  \
-    atomicAdjust.cxx atomicAdjustDummyImpl.cxx \
-    atomicAdjustNsprImpl.cxx \
-    atomicAdjustPosixImpl.cxx \
-    atomicAdjustWin32Impl.cxx \
-    buffer.cxx checksumHashGenerator.cxx clockObject.cxx \
-    conditionVar.cxx \
-    conditionVarDebug.cxx \
-    conditionVarDirect.cxx \
-    conditionVarDummyImpl.cxx \
-    conditionVarNsprImpl.cxx \
-    conditionVarPosixImpl.cxx \
-    conditionVarWin32Impl.cxx \
+    buffer.cxx checksumHashGenerator.cxx \
     config_express.cxx \
-    cycleData.cxx \
-    cycleDataReader.cxx \
-    cycleDataStageReader.cxx \
-    cycleDataStageWriter.cxx \
-    cycleDataWriter.cxx \
-    cyclerHolder.cxx \
     datagram.cxx datagramGenerator.cxx \
     datagramIterator.cxx \
     datagramSink.cxx dcast.cxx \
     encryptStreamBuf.cxx encryptStream.cxx \
     error_utils.cxx \
-    externalThread.cxx \
     hashGeneratorBase.cxx hashVal.cxx \
-    mainThread.cxx \
     memoryInfo.cxx memoryUsage.cxx memoryUsagePointerCounts.cxx \
     memoryUsagePointers.cxx multifile.cxx \
-    mutexDebug.cxx \
-    mutexDirect.cxx \
-    mutexHolder.cxx \
-    pipeline.cxx \
-    pipelineCycler.cxx \
-    pipelineCyclerDummyImpl.cxx \
-    pipelineCyclerTrivialImpl.cxx \
-    pipelineCyclerTrueImpl.cxx \
-    pmutex.cxx \
     namable.cxx \
     nativeNumericData.cxx \
     ordered_vector.cxx \
@@ -157,18 +89,11 @@
     pta_uchar.cxx \
     ramfile.cxx \
     referenceCount.cxx \
-    reMutex.cxx \
-    reMutexDirect.cxx \
-    reMutexHolder.cxx \
     reversedNumericData.cxx \
     streamReader.cxx streamWriter.cxx \
     stringDecoder.cxx \
     subStream.cxx subStreamBuf.cxx \
     textEncoder.cxx \
-    thread.cxx threadDummyImpl.cxx \
-    threadNsprImpl.cxx \
-    threadPosixImpl.cxx \
-    threadWin32Impl.cxx \
     trueClock.cxx \
     typedReferenceCount.cxx \
     unicodeLatinMap.cxx \
@@ -185,86 +110,47 @@
     zStream.cxx zStreamBuf.cxx
 
   #define INSTALL_HEADERS  \
-    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
-    atomicAdjust.I atomicAdjustImpl.h \
-    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
-    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
-    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
-    bigEndian.h buffer.I buffer.h checksumHashGenerator.I  \
-    checksumHashGenerator.h circBuffer.I circBuffer.h clockObject.I \
-    clockObject.h \
-    conditionVar.h conditionVar.I \
-    conditionVarDebug.h conditionVarDebug.I \
-    conditionVarDirect.h conditionVarDirect.I \
-    conditionVarDummyImpl.h conditionVarDummyImpl.I \
-    conditionVarImpl.h \
-    conditionVarNsprImpl.h conditionVarNsprImpl.I \
-    conditionVarPosixImpl.h conditionVarPosixImpl.I \
-    conditionVarWin32Impl.h conditionVarWin32Impl.I \
+    bigEndian.h buffer.I buffer.h \
+    checksumHashGenerator.I checksumHashGenerator.h circBuffer.I \
+    circBuffer.h \
     config_express.h \
-    cycleData.h cycleData.I \
-    cycleDataReader.h cycleDataReader.I \
-    cycleDataStageReader.h cycleDataStageReader.I \
-    cycleDataStageWriter.h cycleDataStageWriter.I \
-    cycleDataWriter.h cycleDataWriter.I \
-    cyclerHolder.h cyclerHolder.I \
-    datagram.I datagram.h \
-    datagramGenerator.I datagramGenerator.h \
-    datagramIterator.I datagramIterator.h \
-    datagramSink.I datagramSink.h dcast.T dcast.h \
+    datagram.I datagram.h datagramGenerator.I \
+    datagramGenerator.h \
+    datagramIterator.I datagramIterator.h datagramSink.I datagramSink.h \
+    dcast.T dcast.h \
     encryptStreamBuf.h encryptStreamBuf.I encryptStream.h encryptStream.I \
-    error_utils.h  \
-    externalThread.h \
-    hashGeneratorBase.I \
-    hashGeneratorBase.h hashVal.I hashVal.h \
+    error_utils.h \
+    hashGeneratorBase.I hashGeneratorBase.h \
+    hashVal.I hashVal.h \
     indirectLess.I indirectLess.h \
     littleEndian.h \
-    mainThread.h \
-    memoryInfo.I memoryInfo.h memoryUsage.I \
-    memoryUsage.h memoryUsagePointerCounts.I \
-    memoryUsagePointerCounts.h memoryUsagePointers.I \
-    memoryUsagePointers.h multifile.I multifile.h \
-    mutexDebug.h mutexDebug.I \
-    mutexDirect.h mutexDirect.I \
-    mutexHolder.h mutexHolder.I \
-    namable.I namable.h \
-    nativeNumericData.I nativeNumericData.h numeric_types.h \
+    memoryInfo.I memoryInfo.h \
+    memoryUsage.I memoryUsage.h \
+    memoryUsagePointerCounts.I memoryUsagePointerCounts.h \
+    memoryUsagePointers.I memoryUsagePointers.h \
+    multifile.I multifile.h \
+    namable.I \
+    namable.h nativeNumericData.I nativeNumericData.h \
+    numeric_types.h \
     ordered_vector.h ordered_vector.I ordered_vector.T \
     password_hash.h \
     patchfile.I patchfile.h \
-    pipeline.h pipeline.I \
-    pipelineCycler.h pipelineCycler.I \
-    pipelineCyclerLinks.h pipelineCyclerLinks.I \
-    pipelineCyclerBase.h  \
-    pipelineCyclerDummyImpl.h pipelineCyclerDummyImpl.I \
-    pipelineCyclerTrivialImpl.h pipelineCyclerTrivialImpl.I \
-    pipelineCyclerTrueImpl.h pipelineCyclerTrueImpl.I \
-    pmutex.h pmutex.I \
     pointerTo.I pointerTo.h \
     pointerToArray.I pointerToArray.h \
     pointerToBase.I pointerToBase.h \
     pointerToVoid.I pointerToVoid.h \
-    profileTimer.I \
-    profileTimer.h pta_uchar.h \
+    profileTimer.I profileTimer.h \
+    pta_uchar.h \
     ramfile.I ramfile.h \
     referenceCount.I referenceCount.h \
-    reMutex.I reMutex.h \
-    reMutexDirect.h reMutexDirect.I \
-    reMutexHolder.I reMutexHolder.h \
     reversedNumericData.I reversedNumericData.h \
     streamReader.I streamReader.h streamWriter.I streamWriter.h \
     stringDecoder.h stringDecoder.I \
     subStream.I subStream.h subStreamBuf.h \
     textEncoder.h textEncoder.I \
-    threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
-    threadNsprImpl.h threadNsprImpl.I \
-    threadPosixImpl.h threadPosixImpl.I \
-    threadWin32Impl.h threadWin32Impl.I \
-    threadPriority.h \
     tokenBoard.I \
     tokenBoard.h trueClock.I trueClock.h \
-    typedReferenceCount.I \
-    typedReferenceCount.h typedef.h \
+    typedReferenceCount.I typedReferenceCount.h typedef.h \
     unicodeLatinMap.h \
     vector_uchar.h \
     virtualFileComposite.h virtualFileComposite.I virtualFile.h \
@@ -321,26 +207,3 @@
 
 #end test_bin_target
 #endif
-
-
-#begin test_bin_target
-  #define TARGET test_threaddata
-  #define LOCAL_LIBS $[LOCAL_LIBS] express
-  #define OTHER_LIBS dtoolutil:c dtool:m pystub
-
-  #define SOURCES \
-    test_threaddata.cxx
-
-#end test_bin_target
-
-
-#begin test_bin_target
-  #define TARGET test_diners
-  #define LOCAL_LIBS $[LOCAL_LIBS] express
-  #define OTHER_LIBS dtoolutil:c dtool:m dtoolconfig:m pystub
-
-  #define SOURCES \
-    test_diners.cxx
-
-#end test_bin_target
-

+ 1 - 32
panda/src/express/config_express.cxx

@@ -1,5 +1,5 @@
 // Filename: config_express.cxx
-// Created by:  cary (04Jan00)
+// Created by:  drose (28Mar06)
 //
 ////////////////////////////////////////////////////////////////////
 //
@@ -16,15 +16,10 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-
 #include "config_express.h"
-#include "clockObject.h"
 #include "datagram.h"
-#include "mainThread.h"
-#include "externalThread.h"
 #include "referenceCount.h"
 #include "textEncoder.h"
-#include "thread.h"
 #include "typedObject.h"
 #include "typedReferenceCount.h"
 #include "virtualFile.h"
@@ -39,7 +34,6 @@
 
 ConfigureDef(config_express);
 NotifyCategoryDef(express, "");
-NotifyCategoryDef(thread, "");
 
 ConfigureFn(config_express) {
   init_libexpress();
@@ -67,20 +61,6 @@ ConfigVariableBool keep_temporary_files
 ConfigVariableDouble average_frame_rate_interval
 ("average-frame-rate-interval", 1.0);
 
-ConfigVariableDouble clock_frame_rate
-("clock-frame-rate", 1.0);
-ConfigVariableDouble clock_degrade_factor
-("clock-degrade-factor", 1.0);
-ConfigVariableDouble max_dt
-("max-dt", -1.0);
-
-ConfigVariableDouble sleep_precision
-("sleep-precision", 0.01,
- PRC_DESC("This is the accuracy within which we can expect select() to "
-          "return precisely.  That is, if we use select() to request a "
-          "timeout of 1.0 seconds, we can expect to actually sleep for "
-          "somewhere between 1.0 and 1.0 + sleep-precision seconds."));
-
 ConfigVariableString encryption_algorithm
 ("encryption-algorithm", "bf-cbc",
  PRC_DESC("This defines the OpenSSL encryption algorithm which is used to "
@@ -169,13 +149,9 @@ init_libexpress() {
   }
   initialized = true;
 
-  ClockObject::init_type();
   Datagram::init_type();
-  MainThread::init_type();
-  ExternalThread::init_type();
   ReferenceCount::init_type();
   TextEncoder::init_type();
-  Thread::init_type();
   TypedObject::init_type();
   TypedReferenceCount::init_type();
   VirtualFile::init_type();
@@ -193,13 +169,6 @@ init_libexpress() {
   ps->add_system("zlib");
  }
 #endif
-
-#ifdef HAVE_THREADS
- {
-  PandaSystem *ps = PandaSystem::get_global_ptr();
-  ps->add_system("threads");
-  }
-#endif
 }
 
 

+ 0 - 6
panda/src/express/config_express.h

@@ -43,7 +43,6 @@
 
 ConfigureDecl(config_express, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS);
 NotifyCategoryDecl(express, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS);
-NotifyCategoryDecl(thread, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS);
 
 // Actually, we can't determine this config variable the normal way,
 // because we must be able to access it at static init time.  Instead
@@ -67,11 +66,6 @@ extern ConfigVariableInt patchfile_zone_size;
 extern ConfigVariableBool keep_temporary_files;
 extern ConfigVariableDouble average_frame_rate_interval;
 
-extern ConfigVariableDouble clock_frame_rate;
-extern ConfigVariableDouble clock_degrade_factor;
-extern ConfigVariableDouble max_dt;
-extern ConfigVariableDouble sleep_precision;
-
 extern ConfigVariableString encryption_algorithm;
 extern ConfigVariableInt encryption_key_length;
 extern ConfigVariableInt encryption_iteration_count;

+ 5 - 24
panda/src/express/express_composite1.cxx

@@ -1,25 +1,6 @@
-#include "atomicAdjust.cxx"
-#include "atomicAdjustDummyImpl.cxx"
-#include "atomicAdjustNsprImpl.cxx"
-#include "atomicAdjustPosixImpl.cxx"
-#include "atomicAdjustWin32Impl.cxx"
 #include "buffer.cxx"
 #include "checksumHashGenerator.cxx"
-#include "clockObject.cxx"
-#include "conditionVar.cxx"
-#include "conditionVarDebug.cxx"
-#include "conditionVarDirect.cxx"
-#include "conditionVarDummyImpl.cxx"
-#include "conditionVarNsprImpl.cxx"
-#include "conditionVarPosixImpl.cxx"
-#include "conditionVarWin32Impl.cxx"
 #include "config_express.cxx"
-#include "cycleData.cxx"
-#include "cycleDataReader.cxx"
-#include "cycleDataStageReader.cxx"
-#include "cycleDataStageWriter.cxx"
-#include "cycleDataWriter.cxx"
-#include "cyclerHolder.cxx"
 #include "datagram.cxx"
 #include "datagramGenerator.cxx"
 #include "datagramIterator.cxx"
@@ -28,20 +9,20 @@
 #include "error_utils.cxx"
 #include "encryptStreamBuf.cxx"
 #include "encryptStream.cxx"
-#include "externalThread.cxx"
 #include "hashGeneratorBase.cxx"
 #include "hashVal.cxx"
-#include "mainThread.cxx"
 #include "memoryInfo.cxx"
 #include "memoryUsage.cxx"
 #include "memoryUsagePointerCounts.cxx"
 #include "memoryUsagePointers.cxx"
 #include "multifile.cxx"
-#include "mutexDebug.cxx"
-#include "mutexDirect.cxx"
-#include "mutexHolder.cxx"
 #include "namable.cxx"
 #include "nativeNumericData.cxx"
 #include "ordered_vector.cxx"
 #include "patchfile.cxx"
 #include "password_hash.cxx"
+#include "pointerTo.cxx"
+#include "pointerToArray.cxx"
+#include "pointerToBase.cxx"
+#include "pointerToVoid.cxx"
+#include "profileTimer.cxx"

+ 0 - 18
panda/src/express/express_composite2.cxx

@@ -1,19 +1,6 @@
-#include "pipeline.cxx"
-#include "pipelineCycler.cxx"
-#include "pipelineCyclerDummyImpl.cxx"
-#include "pipelineCyclerTrivialImpl.cxx"
-#include "pipelineCyclerTrueImpl.cxx"
-#include "pmutex.cxx"
-#include "pointerTo.cxx"
-#include "pointerToArray.cxx"
-#include "pointerToBase.cxx"
-#include "pointerToVoid.cxx"
-#include "profileTimer.cxx"
 #include "pta_uchar.cxx"
 #include "ramfile.cxx"
 #include "referenceCount.cxx"
-#include "reMutex.cxx"
-#include "reMutexHolder.cxx"
 #include "reversedNumericData.cxx"
 #include "streamReader.cxx"
 #include "streamWriter.cxx"
@@ -21,11 +8,6 @@
 #include "subStream.cxx"
 #include "subStreamBuf.cxx"
 #include "textEncoder.cxx"
-#include "thread.cxx"
-#include "threadDummyImpl.cxx"
-#include "threadNsprImpl.cxx"
-#include "threadPosixImpl.cxx"
-#include "threadWin32Impl.cxx"
 #include "trueClock.cxx"
 #include "typedReferenceCount.cxx"
 #include "unicodeLatinMap.cxx"

+ 10 - 10
panda/src/express/memoryUsage.cxx

@@ -474,13 +474,13 @@ ns_record_pointer(ReferenceCount *ptr) {
     info._ref_ptr = ptr;
     info._static_type = ReferenceCount::get_class_type();
     info._dynamic_type = ReferenceCount::get_class_type();
-    info._time = TrueClock::get_ptr()->get_long_time();
+    info._time = TrueClock::get_global_ptr()->get_long_time();
     info._freeze_index = _freeze_index;
     info._flags |= (MemoryInfo::F_reconsider_dynamic_type | MemoryInfo::F_got_ref);
 
     // We close the recursion_protect flag all the way down here, so
     // that we also protect ourselves against a possible recursive
-    // call in TrueClock::get_ptr().
+    // call in TrueClock::get_global_ptr().
     _recursion_protect = false;
   }
 }
@@ -582,7 +582,7 @@ ns_remove_pointer(ReferenceCount *ptr) {
     info._typed_ptr = (TypedObject *)NULL;
 
     if (info._freeze_index == _freeze_index) {
-      double now = TrueClock::get_ptr()->get_long_time();
+      double now = TrueClock::get_global_ptr()->get_long_time();
 
       // We have to protect modifications to the table from recursive
       // calls by toggling _recursion_protect while we adjust it.
@@ -654,13 +654,13 @@ ns_record_void_pointer(void *ptr, size_t size) {
 
     info._void_ptr = ptr;
     info._size = size;
-    info._time = TrueClock::get_ptr()->get_long_time();
+    info._time = TrueClock::get_global_ptr()->get_long_time();
     info._freeze_index = _freeze_index;
     info._flags |= (MemoryInfo::F_got_void | MemoryInfo::F_size_known);
 
     // We close the recursion_protect flag all the way down here, so
     // that we also protect ourselves against a possible recursive
-    // call in TrueClock::get_ptr().
+    // call in TrueClock::get_global_ptr().
     _recursion_protect = false;
   }
 }
@@ -806,7 +806,7 @@ ns_get_pointers(MemoryUsagePointers &result) {
   nassertv(_track_memory_usage);
   result.clear();
 
-  double now = TrueClock::get_ptr()->get_long_time();
+  double now = TrueClock::get_global_ptr()->get_long_time();
   Table::iterator ti;
   for (ti = _table.begin(); ti != _table.end(); ++ti) {
     MemoryInfo &info = (*ti).second;
@@ -830,7 +830,7 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) {
   nassertv(_track_memory_usage);
   result.clear();
 
-  double now = TrueClock::get_ptr()->get_long_time();
+  double now = TrueClock::get_global_ptr()->get_long_time();
   Table::iterator ti;
   for (ti = _table.begin(); ti != _table.end(); ++ti) {
     MemoryInfo &info = (*ti).second;
@@ -859,7 +859,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result,
   nassertv(_track_memory_usage);
   result.clear();
 
-  double now = TrueClock::get_ptr()->get_long_time();
+  double now = TrueClock::get_global_ptr()->get_long_time();
   Table::iterator ti;
   for (ti = _table.begin(); ti != _table.end(); ++ti) {
     MemoryInfo &info = (*ti).second;
@@ -902,7 +902,7 @@ ns_get_pointers_with_zero_count(MemoryUsagePointers &result) {
   nassertv(_track_memory_usage);
   result.clear();
 
-  double now = TrueClock::get_ptr()->get_long_time();
+  double now = TrueClock::get_global_ptr()->get_long_time();
   Table::iterator ti;
   for (ti = _table.begin(); ti != _table.end(); ++ti) {
     MemoryInfo &info = (*ti).second;
@@ -990,7 +990,7 @@ ns_show_current_ages() {
   _recursion_protect = true;
 
   AgeHistogram hist;
-  double now = TrueClock::get_ptr()->get_long_time();
+  double now = TrueClock::get_global_ptr()->get_long_time();
 
   Table::iterator ti;
   for (ti = _table.begin(); ti != _table.end(); ++ti) {

+ 4 - 4
panda/src/express/profileTimer.I

@@ -18,13 +18,13 @@
 
 INLINE void ProfileTimer::
 on() {
-  _on = TrueClock::get_ptr()->get_short_time();
+  _on = TrueClock::get_global_ptr()->get_short_time();
 }
 
 
 INLINE double ProfileTimer::
 getTime() {
-  double time = TrueClock::get_ptr()->get_short_time();
+  double time = TrueClock::get_global_ptr()->get_short_time();
   double et=_elapsedTime+=time-_on;
   _on=time;
   _elapsedTime=0.0;
@@ -51,14 +51,14 @@ mark(const char* tag) {
 
 INLINE void ProfileTimer::
 off() {
-  double time = TrueClock::get_ptr()->get_short_time();
+  double time = TrueClock::get_global_ptr()->get_short_time();
   _elapsedTime+=time-_on;
 }
 
 
 INLINE void ProfileTimer::
 off(const char* tag) {
-  double time = TrueClock::get_ptr()->get_short_time();
+  double time = TrueClock::get_global_ptr()->get_short_time();
   _elapsedTime+=time-_on;
   mark(tag);
 }

+ 15 - 15
panda/src/express/trueClock.I

@@ -16,23 +16,9 @@
 //
 ////////////////////////////////////////////////////////////////////
 
-////////////////////////////////////////////////////////////////////
-//     Function: TrueClock::get_ptr
-//       Access: Public
-//  Description: Returns a pointer to the one TrueClock object in
-//               the world.
-////////////////////////////////////////////////////////////////////
-INLINE TrueClock *TrueClock::
-get_ptr() {
-  if (_global_ptr == (TrueClock *)NULL) {
-    _global_ptr = new TrueClock;
-  }
-  return _global_ptr;
-}
-
 ////////////////////////////////////////////////////////////////////
 //     Function: TrueClock::get_error_count
-//       Access: Public
+//       Access: Published
 //  Description: Returns the number of clock errors that have
 //               been detected.  Each time a clock error is detected,
 //               in which the value returned by either of the above
@@ -46,6 +32,20 @@ get_error_count() const {
   return _error_count;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: TrueClock::get_global_ptr
+//       Access: Published, Static
+//  Description: Returns a pointer to the one TrueClock object in
+//               the world.
+////////////////////////////////////////////////////////////////////
+INLINE TrueClock *TrueClock::
+get_global_ptr() {
+  if (_global_ptr == (TrueClock *)NULL) {
+    _global_ptr = new TrueClock;
+  }
+  return _global_ptr;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: TrueClock::Destructor
 //       Access: Protected

+ 3 - 3
panda/src/express/trueClock.h

@@ -38,9 +38,7 @@
 //               and subtracting.
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDAEXPRESS TrueClock {
-public:
-  INLINE static TrueClock *get_ptr();
-
+PUBLISHED:
   // get_long_time() returns the most accurate timer we have over a
   // long interval.  It may not be very precise for measuring short
   // intervals, but it should not drift substantially over the long
@@ -55,6 +53,8 @@ public:
 
   INLINE int get_error_count() const;
 
+  INLINE static TrueClock *get_global_ptr();
+
 protected:
   TrueClock();
   INLINE ~TrueClock();

+ 159 - 0
panda/src/pipeline/Sources.pp

@@ -0,0 +1,159 @@
+#define LOCAL_LIBS express pandabase
+#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
+                   dtoolutil:c dtoolbase:c dtool:m prc:c
+
+#begin lib_target
+  #define TARGET pipeline
+  
+  #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx
+
+  #define SOURCES \
+    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
+    atomicAdjust.I atomicAdjustImpl.h \
+    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
+    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
+    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
+    conditionVar.h conditionVar.I \
+    conditionVarDebug.h conditionVarDebug.I \
+    conditionVarDirect.h conditionVarDirect.I \
+    conditionVarDummyImpl.h conditionVarDummyImpl.I \
+    conditionVarImpl.h \
+    conditionVarNsprImpl.h conditionVarNsprImpl.I \
+    conditionVarPosixImpl.h conditionVarPosixImpl.I \
+    conditionVarWin32Impl.h conditionVarWin32Impl.I \
+    config_pipeline.h \
+    cycleData.h cycleData.I \
+    cycleDataReader.h cycleDataReader.I \
+    cycleDataStageReader.h cycleDataStageReader.I \
+    cycleDataStageWriter.h cycleDataStageWriter.I \
+    cycleDataWriter.h cycleDataWriter.I \
+    cyclerHolder.h cyclerHolder.I \
+    externalThread.h \
+    mainThread.h \
+    mutexDebug.h mutexDebug.I \
+    mutexDirect.h mutexDirect.I \
+    mutexHolder.h mutexHolder.I \
+    pipeline.h pipeline.I \
+    pipelineCycler.h pipelineCycler.I \
+    pipelineCyclerLinks.h pipelineCyclerLinks.I \
+    pipelineCyclerBase.h  \
+    pipelineCyclerDummyImpl.h pipelineCyclerDummyImpl.I \
+    pipelineCyclerTrivialImpl.h pipelineCyclerTrivialImpl.I \
+    pipelineCyclerTrueImpl.h pipelineCyclerTrueImpl.I \
+    pmutex.h pmutex.I \
+    reMutex.I reMutex.h \
+    reMutexDirect.h reMutexDirect.I \
+    reMutexHolder.I reMutexHolder.h \
+    threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
+    threadNsprImpl.h threadNsprImpl.I \
+    threadPosixImpl.h threadPosixImpl.I \
+    threadWin32Impl.h threadWin32Impl.I \
+    threadPriority.h
+
+  #define INCLUDED_SOURCES  \
+    atomicAdjust.cxx atomicAdjustDummyImpl.cxx \
+    atomicAdjustNsprImpl.cxx \
+    atomicAdjustPosixImpl.cxx \
+    atomicAdjustWin32Impl.cxx \
+    conditionVar.cxx \
+    conditionVarDebug.cxx \
+    conditionVarDirect.cxx \
+    conditionVarDummyImpl.cxx \
+    conditionVarNsprImpl.cxx \
+    conditionVarPosixImpl.cxx \
+    conditionVarWin32Impl.cxx \
+    config_pipeline.cxx \
+    cycleData.cxx \
+    cycleDataReader.cxx \
+    cycleDataStageReader.cxx \
+    cycleDataStageWriter.cxx \
+    cycleDataWriter.cxx \
+    cyclerHolder.cxx \
+    externalThread.cxx \
+    mainThread.cxx \
+    mutexDebug.cxx \
+    mutexDirect.cxx \
+    mutexHolder.cxx \
+    pipeline.cxx \
+    pipelineCycler.cxx \
+    pipelineCyclerDummyImpl.cxx \
+    pipelineCyclerTrivialImpl.cxx \
+    pipelineCyclerTrueImpl.cxx \
+    pmutex.cxx \
+    reMutex.cxx \
+    reMutexDirect.cxx \
+    reMutexHolder.cxx \
+    thread.cxx threadDummyImpl.cxx \
+    threadNsprImpl.cxx \
+    threadPosixImpl.cxx \
+    threadWin32Impl.cxx
+
+  #define INSTALL_HEADERS  \
+    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
+    atomicAdjust.I atomicAdjustImpl.h \
+    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
+    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
+    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
+    conditionVar.h conditionVar.I \
+    conditionVarDebug.h conditionVarDebug.I \
+    conditionVarDirect.h conditionVarDirect.I \
+    conditionVarDummyImpl.h conditionVarDummyImpl.I \
+    conditionVarImpl.h \
+    conditionVarNsprImpl.h conditionVarNsprImpl.I \
+    conditionVarPosixImpl.h conditionVarPosixImpl.I \
+    conditionVarWin32Impl.h conditionVarWin32Impl.I \
+    config_pipeline.h \
+    cycleData.h cycleData.I \
+    cycleDataReader.h cycleDataReader.I \
+    cycleDataStageReader.h cycleDataStageReader.I \
+    cycleDataStageWriter.h cycleDataStageWriter.I \
+    cycleDataWriter.h cycleDataWriter.I \
+    cyclerHolder.h cyclerHolder.I \
+    externalThread.h \
+    mainThread.h \
+    mutexDebug.h mutexDebug.I \
+    mutexDirect.h mutexDirect.I \
+    mutexHolder.h mutexHolder.I \
+    pipeline.h pipeline.I \
+    pipelineCycler.h pipelineCycler.I \
+    pipelineCyclerLinks.h pipelineCyclerLinks.I \
+    pipelineCyclerBase.h  \
+    pipelineCyclerDummyImpl.h pipelineCyclerDummyImpl.I \
+    pipelineCyclerTrivialImpl.h pipelineCyclerTrivialImpl.I \
+    pipelineCyclerTrueImpl.h pipelineCyclerTrueImpl.I \
+    pmutex.h pmutex.I \
+    reMutex.I reMutex.h \
+    reMutexDirect.h reMutexDirect.I \
+    reMutexHolder.I reMutexHolder.h \
+    threadDummyImpl.h threadDummyImpl.I thread.h thread.I threadImpl.h \
+    threadNsprImpl.h threadNsprImpl.I \
+    threadPosixImpl.h threadPosixImpl.I \
+    threadWin32Impl.h threadWin32Impl.I \
+    threadPriority.h
+
+  #define IGATESCAN all
+
+#end lib_target
+
+
+#begin test_bin_target
+  #define TARGET test_threaddata
+  #define LOCAL_LIBS $[LOCAL_LIBS] express
+  #define OTHER_LIBS dtoolutil:c dtool:m pystub
+
+  #define SOURCES \
+    test_threaddata.cxx
+
+#end test_bin_target
+
+
+#begin test_bin_target
+  #define TARGET test_diners
+  #define LOCAL_LIBS $[LOCAL_LIBS] express
+  #define OTHER_LIBS dtoolutil:c dtool:m dtoolconfig:m pystub
+
+  #define SOURCES \
+    test_diners.cxx
+
+#end test_bin_target
+

+ 0 - 0
panda/src/express/atomicAdjust.I → panda/src/pipeline/atomicAdjust.I


+ 0 - 0
panda/src/express/atomicAdjust.cxx → panda/src/pipeline/atomicAdjust.cxx


+ 1 - 1
panda/src/express/atomicAdjust.h → panda/src/pipeline/atomicAdjust.h

@@ -30,7 +30,7 @@
 //               others to guarantee that a multibyte value is changed
 //               in one atomic operation.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS AtomicAdjust {
+class EXPCL_PANDA AtomicAdjust {
 public:
   INLINE static PN_int32 inc(PN_int32 &var);
   INLINE static PN_int32 dec(PN_int32 &var);

+ 0 - 0
panda/src/express/atomicAdjustDummyImpl.I → panda/src/pipeline/atomicAdjustDummyImpl.I


+ 0 - 0
panda/src/express/atomicAdjustDummyImpl.cxx → panda/src/pipeline/atomicAdjustDummyImpl.cxx


+ 1 - 1
panda/src/express/atomicAdjustDummyImpl.h → panda/src/pipeline/atomicAdjustDummyImpl.h

@@ -33,7 +33,7 @@
 //               systems that don't require multiprogramming, and
 //               therefore don't require special atomic operations.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS AtomicAdjustDummyImpl {
+class EXPCL_PANDA AtomicAdjustDummyImpl {
 public:
   INLINE static PN_int32 inc(PN_int32 &var);
   INLINE static PN_int32 dec(PN_int32 &var);

+ 0 - 0
panda/src/express/atomicAdjustImpl.h → panda/src/pipeline/atomicAdjustImpl.h


+ 0 - 0
panda/src/express/atomicAdjustNsprImpl.I → panda/src/pipeline/atomicAdjustNsprImpl.I


+ 0 - 0
panda/src/express/atomicAdjustNsprImpl.cxx → panda/src/pipeline/atomicAdjustNsprImpl.cxx


+ 1 - 1
panda/src/express/atomicAdjustNsprImpl.h → panda/src/pipeline/atomicAdjustNsprImpl.h

@@ -33,7 +33,7 @@
 //       Class : AtomicAdjustNsprImpl
 // Description : Uses NSPR to implement atomic adjustments.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS AtomicAdjustNsprImpl {
+class EXPCL_PANDA AtomicAdjustNsprImpl {
 public:
   INLINE static PN_int32 inc(PN_int32 &var);
   INLINE static PN_int32 dec(PN_int32 &var);

+ 0 - 0
panda/src/express/atomicAdjustPosixImpl.I → panda/src/pipeline/atomicAdjustPosixImpl.I


+ 0 - 0
panda/src/express/atomicAdjustPosixImpl.cxx → panda/src/pipeline/atomicAdjustPosixImpl.cxx


+ 1 - 1
panda/src/express/atomicAdjustPosixImpl.h → panda/src/pipeline/atomicAdjustPosixImpl.h

@@ -33,7 +33,7 @@
 //       Class : AtomicAdjustPosixImpl
 // Description : Uses POSIX to implement atomic adjustments.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS AtomicAdjustPosixImpl {
+class EXPCL_PANDA AtomicAdjustPosixImpl {
 public:
   INLINE static PN_int32 inc(PN_int32 &var);
   INLINE static PN_int32 dec(PN_int32 &var);

+ 0 - 0
panda/src/express/atomicAdjustWin32Impl.I → panda/src/pipeline/atomicAdjustWin32Impl.I


+ 0 - 0
panda/src/express/atomicAdjustWin32Impl.cxx → panda/src/pipeline/atomicAdjustWin32Impl.cxx


+ 1 - 1
panda/src/express/atomicAdjustWin32Impl.h → panda/src/pipeline/atomicAdjustWin32Impl.h

@@ -34,7 +34,7 @@
 // Description : Uses Windows native calls to implement atomic
 //               adjustments.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS AtomicAdjustWin32Impl {
+class EXPCL_PANDA AtomicAdjustWin32Impl {
 public:
   INLINE static PN_int32 inc(PN_int32 &var);
   INLINE static PN_int32 dec(PN_int32 &var);

+ 0 - 0
panda/src/express/conditionVar.I → panda/src/pipeline/conditionVar.I


+ 0 - 0
panda/src/express/conditionVar.cxx → panda/src/pipeline/conditionVar.cxx


+ 2 - 2
panda/src/express/conditionVar.h → panda/src/pipeline/conditionVar.h

@@ -40,9 +40,9 @@
 //               the definition of DEBUG_THREADS.
 ////////////////////////////////////////////////////////////////////
 #ifdef DEBUG_THREADS
-class EXPCL_PANDAEXPRESS ConditionVar : public ConditionVarDebug
+class EXPCL_PANDA ConditionVar : public ConditionVarDebug
 #else
-class EXPCL_PANDAEXPRESS ConditionVar : public ConditionVarDirect
+class EXPCL_PANDA ConditionVar : public ConditionVarDirect
 #endif  // DEBUG_THREADS
 {
 public:

+ 0 - 0
panda/src/express/conditionVarDebug.I → panda/src/pipeline/conditionVarDebug.I


+ 0 - 0
panda/src/express/conditionVarDebug.cxx → panda/src/pipeline/conditionVarDebug.cxx


+ 1 - 1
panda/src/express/conditionVarDebug.h → panda/src/pipeline/conditionVarDebug.h

@@ -37,7 +37,7 @@
 //               mutex, and several condition variables may share the
 //               same mutex.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarDebug {
+class EXPCL_PANDA ConditionVarDebug {
 public:
   ConditionVarDebug(MutexDebug &mutex);
   virtual ~ConditionVarDebug();

+ 0 - 0
panda/src/express/conditionVarDirect.I → panda/src/pipeline/conditionVarDirect.I


+ 0 - 0
panda/src/express/conditionVarDirect.cxx → panda/src/pipeline/conditionVarDirect.cxx


+ 1 - 1
panda/src/express/conditionVarDirect.h → panda/src/pipeline/conditionVarDirect.h

@@ -37,7 +37,7 @@
 //               mutex, and several condition variables may share the
 //               same mutex.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarDirect {
+class EXPCL_PANDA ConditionVarDirect {
 public:
   INLINE ConditionVarDirect(MutexDirect &mutex);
   INLINE ~ConditionVarDirect();

+ 0 - 0
panda/src/express/conditionVarDummyImpl.I → panda/src/pipeline/conditionVarDummyImpl.I


+ 0 - 0
panda/src/express/conditionVarDummyImpl.cxx → panda/src/pipeline/conditionVarDummyImpl.cxx


+ 1 - 1
panda/src/express/conditionVarDummyImpl.h → panda/src/pipeline/conditionVarDummyImpl.h

@@ -34,7 +34,7 @@ class MutexDummyImpl;
 //               single-threaded applications that don't need any
 //               synchronization control.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarDummyImpl {
+class EXPCL_PANDA ConditionVarDummyImpl {
 public:
   INLINE ConditionVarDummyImpl(MutexDummyImpl &mutex);
   INLINE ~ConditionVarDummyImpl();

+ 0 - 0
panda/src/express/conditionVarImpl.h → panda/src/pipeline/conditionVarImpl.h


+ 0 - 0
panda/src/express/conditionVarNsprImpl.I → panda/src/pipeline/conditionVarNsprImpl.I


+ 0 - 0
panda/src/express/conditionVarNsprImpl.cxx → panda/src/pipeline/conditionVarNsprImpl.cxx


+ 1 - 1
panda/src/express/conditionVarNsprImpl.h → panda/src/pipeline/conditionVarNsprImpl.h

@@ -35,7 +35,7 @@ class MutexNsprImpl;
 //       Class : ConditionVarNsprImpl
 // Description : Uses NSPR to implement a conditionVar.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarNsprImpl {
+class EXPCL_PANDA ConditionVarNsprImpl {
 public:
   INLINE ConditionVarNsprImpl(MutexNsprImpl &mutex);
   INLINE ~ConditionVarNsprImpl();

+ 0 - 0
panda/src/express/conditionVarPosixImpl.I → panda/src/pipeline/conditionVarPosixImpl.I


+ 0 - 0
panda/src/express/conditionVarPosixImpl.cxx → panda/src/pipeline/conditionVarPosixImpl.cxx


+ 1 - 1
panda/src/express/conditionVarPosixImpl.h → panda/src/pipeline/conditionVarPosixImpl.h

@@ -35,7 +35,7 @@ class MutexPosixImpl;
 //       Class : ConditionVarPosixImpl
 // Description : Uses Posix threads to implement a conditionVar.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarPosixImpl {
+class EXPCL_PANDA ConditionVarPosixImpl {
 public:
   INLINE ConditionVarPosixImpl(MutexPosixImpl &mutex);
   INLINE ~ConditionVarPosixImpl();

+ 0 - 0
panda/src/express/conditionVarWin32Impl.I → panda/src/pipeline/conditionVarWin32Impl.I


+ 0 - 0
panda/src/express/conditionVarWin32Impl.cxx → panda/src/pipeline/conditionVarWin32Impl.cxx


+ 1 - 1
panda/src/express/conditionVarWin32Impl.h → panda/src/pipeline/conditionVarWin32Impl.h

@@ -46,7 +46,7 @@ class MutexWin32Impl;
 //               so we can avoid the overhead require to support
 //               broadcast.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ConditionVarWin32Impl {
+class EXPCL_PANDA ConditionVarWin32Impl {
 public:
   INLINE ConditionVarWin32Impl(MutexWin32Impl &mutex);
   INLINE ~ConditionVarWin32Impl();

+ 61 - 0
panda/src/pipeline/config_pipeline.cxx

@@ -0,0 +1,61 @@
+// Filename: config_pipeline.cxx
+// Created by:  drose (28Mar06)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001 - 2004, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://etc.cmu.edu/panda3d/docs/license/ .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+#include "config_pipeline.h"
+#include "mainThread.h"
+#include "externalThread.h"
+#include "thread.h"
+#include "pandaSystem.h"
+
+#include "dconfig.h"
+
+ConfigureDef(config_pipeline);
+NotifyCategoryDef(pipeline, "");
+NotifyCategoryDef(thread, "");
+
+ConfigureFn(config_pipeline) {
+  init_libpipeline();
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: init_libpipeline
+//  Description: Initializes the library.  This must be called at
+//               least once before any of the functions or classes in
+//               this library can be used.  Normally it will be
+//               called by the static initializers and need not be
+//               called explicitly, but special cases exist.
+////////////////////////////////////////////////////////////////////
+void
+init_libpipeline() {
+  static bool initialized = false;
+  if (initialized) {
+    return;
+  }
+  initialized = true;
+
+  MainThread::init_type();
+  ExternalThread::init_type();
+  Thread::init_type();
+
+#ifdef HAVE_THREADS
+ {
+  PandaSystem *ps = PandaSystem::get_global_ptr();
+  ps->add_system("threads");
+  }
+#endif
+}

+ 33 - 0
panda/src/pipeline/config_pipeline.h

@@ -0,0 +1,33 @@
+// Filename: config_pipeline.h
+// Created by:  cary (04Jan00)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001 - 2004, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://etc.cmu.edu/panda3d/docs/license/ .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+#ifndef CONFIG_PIPELINE_H
+#define CONFIG_PIPELINE_H
+
+#include "pandabase.h"
+#include "notifyCategoryProxy.h"
+#include "dconfig.h"
+
+ConfigureDecl(config_pipeline, EXPCL_PANDA, EXPTP_PANDA);
+NotifyCategoryDecl(pipeline, EXPCL_PANDA, EXPTP_PANDA);
+NotifyCategoryDecl(thread, EXPCL_PANDA, EXPTP_PANDA);
+
+extern EXPCL_PANDA void init_libpipeline();
+
+#endif  // CONFIG_PIPELINE_H
+

+ 0 - 0
panda/src/express/cycleData.I → panda/src/pipeline/cycleData.I


+ 0 - 0
panda/src/express/cycleData.cxx → panda/src/pipeline/cycleData.cxx


+ 2 - 2
panda/src/express/cycleData.h → panda/src/pipeline/cycleData.h

@@ -41,14 +41,14 @@ class DatagramIterator;
 // If we are compiling in pipelining support, we maintain a pointer to
 // a CycleData object in each containing class, instead of the object
 // itself.  Thus, it should be a ReferenceCount object.
-class EXPCL_PANDAEXPRESS CycleData : public ReferenceCount 
+class EXPCL_PANDA CycleData : public ReferenceCount 
 
 #else  // !DO_PIPELINING
 
 // If we are *not* compiling in pipelining support, the CycleData
 // object is stored directly within its containing classes, and hence
 // should not be a ReferenceCount object.
-class EXPCL_PANDAEXPRESS CycleData
+class EXPCL_PANDA CycleData
 
 #endif  // DO_PIPELINING
 {

+ 0 - 0
panda/src/express/cycleDataReader.I → panda/src/pipeline/cycleDataReader.I


+ 0 - 0
panda/src/express/cycleDataReader.cxx → panda/src/pipeline/cycleDataReader.cxx


+ 0 - 0
panda/src/express/cycleDataReader.h → panda/src/pipeline/cycleDataReader.h


+ 0 - 0
panda/src/express/cycleDataStageReader.I → panda/src/pipeline/cycleDataStageReader.I


+ 0 - 0
panda/src/express/cycleDataStageReader.cxx → panda/src/pipeline/cycleDataStageReader.cxx


+ 0 - 0
panda/src/express/cycleDataStageReader.h → panda/src/pipeline/cycleDataStageReader.h


+ 0 - 0
panda/src/express/cycleDataStageWriter.I → panda/src/pipeline/cycleDataStageWriter.I


+ 0 - 0
panda/src/express/cycleDataStageWriter.cxx → panda/src/pipeline/cycleDataStageWriter.cxx


+ 0 - 0
panda/src/express/cycleDataStageWriter.h → panda/src/pipeline/cycleDataStageWriter.h


+ 0 - 0
panda/src/express/cycleDataWriter.I → panda/src/pipeline/cycleDataWriter.I


+ 0 - 0
panda/src/express/cycleDataWriter.cxx → panda/src/pipeline/cycleDataWriter.cxx


+ 0 - 0
panda/src/express/cycleDataWriter.h → panda/src/pipeline/cycleDataWriter.h


+ 0 - 0
panda/src/express/cyclerHolder.I → panda/src/pipeline/cyclerHolder.I


+ 0 - 0
panda/src/express/cyclerHolder.cxx → panda/src/pipeline/cyclerHolder.cxx


+ 1 - 1
panda/src/express/cyclerHolder.h → panda/src/pipeline/cyclerHolder.h

@@ -29,7 +29,7 @@
 //               PipelineCyclerBase object.  This is similar to a
 //               MutexHolder.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS CyclerHolder {
+class EXPCL_PANDA CyclerHolder {
 public:
   INLINE CyclerHolder(PipelineCyclerBase &cycler);
   INLINE ~CyclerHolder();

+ 0 - 0
panda/src/express/externalThread.cxx → panda/src/pipeline/externalThread.cxx


+ 1 - 1
panda/src/express/externalThread.h → panda/src/pipeline/externalThread.h

@@ -28,7 +28,7 @@
 //               instance of these in the world, and it is returned by
 //               Thread::get_external_thread().
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS ExternalThread : public Thread {
+class EXPCL_PANDA ExternalThread : public Thread {
 private:
   ExternalThread();
   ExternalThread(const string &name, const string &sync_name);

+ 0 - 0
panda/src/express/mainThread.cxx → panda/src/pipeline/mainThread.cxx


+ 1 - 1
panda/src/express/mainThread.h → panda/src/pipeline/mainThread.h

@@ -28,7 +28,7 @@
 //               instance of these in the world, and it is returned by
 //               Thread::get_main_thread().
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS MainThread : public Thread {
+class EXPCL_PANDA MainThread : public Thread {
 private:
   MainThread();
   virtual void thread_main();

+ 0 - 0
panda/src/express/mutexDebug.I → panda/src/pipeline/mutexDebug.I


+ 45 - 3
panda/src/express/mutexDebug.cxx → panda/src/pipeline/mutexDebug.cxx

@@ -18,9 +18,13 @@
 
 #include "mutexDebug.h"
 #include "thread.h"
+#include "config_pipeline.h"
 
 #ifdef DEBUG_THREADS
 
+MutexDebug::VoidFunc *MutexDebug::_pstats_wait_start;
+MutexDebug::VoidFunc *MutexDebug::_pstats_wait_stop;
+
 MutexImpl MutexDebug::_global_mutex;
 
 ////////////////////////////////////////////////////////////////////
@@ -52,6 +56,24 @@ output(ostream &out) const {
   }
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MutexDebug::set_pstats_callbacks
+//       Access: Public, Static
+//  Description: This special function exists to provide hooks into
+//               the PStatClient system, so we can time the amount of
+//               time we spend waiting for a mutex lock (if the user
+//               configures this on).  We have to do this nutty void
+//               function callback thing, because PStats is defined in
+//               a later module (it depends on this module, because it
+//               needs to use mutex locks, of course).
+////////////////////////////////////////////////////////////////////
+void MutexDebug::
+set_pstats_callbacks(MutexDebug::VoidFunc *wait_start, 
+                     MutexDebug::VoidFunc *wait_stop) {
+  _pstats_wait_start = wait_start;
+  _pstats_wait_stop = wait_stop;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MutexDebug::do_lock
 //       Access: Private
@@ -86,14 +108,27 @@ do_lock() {
     ++_lock_count;
 
   } else {
-    // The mutex is locked by some other thread.  Check for deadlock?
-    MutexDebug *next_mutex = this;
+    // The mutex is locked by some other thread.
+#ifdef DO_PSTATS
+    if (_pstats_wait_start != NULL) {
+      (*_pstats_wait_start)();
+    }
+#endif  // DO_PSTATS
 
+    // Check for deadlock.
+    MutexDebug *next_mutex = this;
     while (next_mutex != NULL) {
       if (next_mutex->_locking_thread == this_thread) {
         // Whoops, the thread is blocked on me!  Deadlock!
         report_deadlock(this_thread);
         nassert_raise("Deadlock");
+
+#ifdef DO_PSTATS
+        if (_pstats_wait_stop != NULL) {
+          (*_pstats_wait_stop)();
+        }
+#endif  // DO_PSTATS
+
         _global_mutex.release();
         return;
       }
@@ -122,6 +157,7 @@ do_lock() {
     while (_locking_thread != (Thread *)NULL) {
       _cvar.wait();
     }
+    
     if (thread_cat.is_spam()) {
       thread_cat.spam()
         << *this_thread << " awake\n";
@@ -132,7 +168,13 @@ do_lock() {
     _locking_thread = this_thread;
     ++_lock_count;
     nassertv(_lock_count == 1);
-  }
+
+ #ifdef DO_PSTATS
+    if (_pstats_wait_stop != NULL) {
+      (*_pstats_wait_stop)();
+    }
+#endif  // DO_PSTATS
+   }
 }
 
 ////////////////////////////////////////////////////////////////////

+ 6 - 1
panda/src/express/mutexDebug.h → panda/src/pipeline/mutexDebug.h

@@ -33,7 +33,7 @@ class Thread;
 //               by doing everything by hand.  This does allow fancy
 //               things like deadlock detection, however.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS MutexDebug {
+class EXPCL_PANDA MutexDebug {
 protected:
   INLINE MutexDebug(bool allow_recursion);
   virtual ~MutexDebug();
@@ -48,6 +48,9 @@ public:
 
   virtual void output(ostream &out) const;
 
+  typedef void VoidFunc();
+  static void set_pstats_callbacks(VoidFunc *wait_start, VoidFunc *wait_stop);
+
 private:
   void do_lock();
   void do_release();
@@ -61,6 +64,8 @@ private:
   int _lock_count;
   ConditionVarImpl _cvar;
 
+  static VoidFunc *_pstats_wait_start, *_pstats_wait_stop;
+
   static MutexImpl _global_mutex;
 
   friend class ConditionVarDebug;

+ 0 - 0
panda/src/express/mutexDirect.I → panda/src/pipeline/mutexDirect.I


+ 0 - 0
panda/src/express/mutexDirect.cxx → panda/src/pipeline/mutexDirect.cxx


+ 1 - 1
panda/src/express/mutexDirect.h → panda/src/pipeline/mutexDirect.h

@@ -32,7 +32,7 @@ class Thread;
 //               direct calls to the underlying implementation layer.
 //               It doesn't perform any debugging operations.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS MutexDirect {
+class EXPCL_PANDA MutexDirect {
 protected:
   INLINE MutexDirect();
   INLINE ~MutexDirect();

+ 0 - 0
panda/src/express/mutexHolder.I → panda/src/pipeline/mutexHolder.I


+ 0 - 0
panda/src/express/mutexHolder.cxx → panda/src/pipeline/mutexHolder.cxx


+ 1 - 1
panda/src/express/mutexHolder.h → panda/src/pipeline/mutexHolder.h

@@ -30,7 +30,7 @@
 //               release() automatically when a block exits (for
 //               instance, on return).
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS MutexHolder {
+class EXPCL_PANDA MutexHolder {
 public:
   INLINE MutexHolder(const Mutex &mutex);
   INLINE MutexHolder(Mutex *&mutex);

+ 0 - 0
panda/src/express/pipeline.I → panda/src/pipeline/pipeline.I


+ 2 - 2
panda/src/express/pipeline.cxx → panda/src/pipeline/pipeline.cxx

@@ -20,7 +20,7 @@
 #include "pipelineCyclerTrueImpl.h"
 #include "reMutexHolder.h"
 #include "configVariableInt.h"
-#include "config_express.h"
+#include "config_pipeline.h"
 
 Pipeline *Pipeline::_render_pipeline = (Pipeline *)NULL;
 
@@ -199,7 +199,7 @@ set_num_stages(int num_stages) {
 
 #else  // THREADED_PIPELINE
   if (num_stages != 1) {
-    express_cat.warning()
+    pipeline_cat.warning()
       << "Requested " << num_stages
       << " pipeline stages but multithreaded render pipelines not enabled in build.\n";
   }

+ 1 - 1
panda/src/express/pipeline.h → panda/src/pipeline/pipeline.h

@@ -41,7 +41,7 @@ struct PipelineCyclerTrueImpl;
 //               pipeline.  Other specialty pipelines may be created
 //               as needed.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS Pipeline : public PipelineCyclerLinks, public Namable {
+class EXPCL_PANDA Pipeline : public PipelineCyclerLinks, public Namable {
 public:
   Pipeline(const string &name, int num_stages);
   ~Pipeline();

+ 0 - 0
panda/src/express/pipelineCycler.I → panda/src/pipeline/pipelineCycler.I


+ 0 - 0
panda/src/express/pipelineCycler.cxx → panda/src/pipeline/pipelineCycler.cxx


+ 0 - 0
panda/src/express/pipelineCycler.h → panda/src/pipeline/pipelineCycler.h


+ 0 - 0
panda/src/express/pipelineCyclerBase.h → panda/src/pipeline/pipelineCyclerBase.h


+ 0 - 0
panda/src/express/pipelineCyclerDummyImpl.I → panda/src/pipeline/pipelineCyclerDummyImpl.I


+ 0 - 0
panda/src/express/pipelineCyclerDummyImpl.cxx → panda/src/pipeline/pipelineCyclerDummyImpl.cxx


+ 1 - 1
panda/src/express/pipelineCyclerDummyImpl.h → panda/src/pipeline/pipelineCyclerDummyImpl.h

@@ -45,7 +45,7 @@
 //               mainly to be consistent with
 //               PipelineCyclerTrivialImpl.
 ////////////////////////////////////////////////////////////////////
-struct EXPCL_PANDAEXPRESS PipelineCyclerDummyImpl {
+struct EXPCL_PANDA PipelineCyclerDummyImpl {
 public:
   INLINE PipelineCyclerDummyImpl(CycleData *initial_data, Pipeline *pipeline = NULL);
   INLINE PipelineCyclerDummyImpl(const PipelineCyclerDummyImpl &copy);

+ 0 - 0
panda/src/express/pipelineCyclerLinks.I → panda/src/pipeline/pipelineCyclerLinks.I


+ 1 - 1
panda/src/express/pipelineCyclerLinks.h → panda/src/pipeline/pipelineCyclerLinks.h

@@ -36,7 +36,7 @@
 //               so the Pipeline object itself can be the root of the
 //               linked list.
 ////////////////////////////////////////////////////////////////////
-class EXPCL_PANDAEXPRESS PipelineCyclerLinks {
+class EXPCL_PANDA PipelineCyclerLinks {
 protected:
 #ifdef THREADED_PIPELINE
   INLINE PipelineCyclerLinks();

+ 0 - 0
panda/src/express/pipelineCyclerTrivialImpl.I → panda/src/pipeline/pipelineCyclerTrivialImpl.I


+ 0 - 0
panda/src/express/pipelineCyclerTrivialImpl.cxx → panda/src/pipeline/pipelineCyclerTrivialImpl.cxx


+ 1 - 1
panda/src/express/pipelineCyclerTrivialImpl.h → panda/src/pipeline/pipelineCyclerTrivialImpl.h

@@ -47,7 +47,7 @@ class Pipeline;
 //               object, so that the inherited struct's data is likely
 //               to be placed by the compiler at the "this" pointer.
 ////////////////////////////////////////////////////////////////////
-struct EXPCL_PANDAEXPRESS PipelineCyclerTrivialImpl {
+struct EXPCL_PANDA PipelineCyclerTrivialImpl {
 public:
   INLINE PipelineCyclerTrivialImpl(CycleData *initial_data, Pipeline *pipeline = NULL);
 private:

+ 0 - 0
panda/src/express/pipelineCyclerTrueImpl.I → panda/src/pipeline/pipelineCyclerTrueImpl.I


+ 1 - 1
panda/src/express/pipelineCyclerTrueImpl.cxx → panda/src/pipeline/pipelineCyclerTrueImpl.cxx

@@ -20,7 +20,7 @@
 
 #ifdef THREADED_PIPELINE
 
-#include "config_express.h"
+#include "config_pipeline.h"
 #include "pipeline.h"
 
 ////////////////////////////////////////////////////////////////////

Some files were not shown because too many files changed in this diff