Changeset 19810

Show
Ignore:
Timestamp:
02/13/07 17:12:30 (2 years ago)
Author:
patrick
Message:

Throw the switch and start using the Win32 thread and synchronization
functions directly instead of going through NSPR. This code has received
quite a bit of testing, and it seems stable to me. Consider this the first
step in what will probably be a slow journey away from needing NSPR on
Windows. Aside from reducing our reliance on NSPR, the semaphore
implementation should perform much better now because we do not have to mimic
semaphore behavior using vpr::CondVarNSPR (which uses PRCondVar which in turn
is implemented using, that's right, Win32 semaphores).

Bumped VPR version to 1.1.41.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vapor/ChangeLog

    r19808 r19810  
    11DATE       AUTHOR   CHANGE 
    22---------- -------- ----------------------------------------------------------- 
     32007-02-13 patrick  Use the Win32 thread and sychronization APIs directly 
     4                    instead of using NSPR. 
     5                    NEW VERSION: 1.1.41 
    362007-02-13 patrick  Reimplemented vpr::CondVarWin32 using a simpler approach. 
    47                    NEW VERSION: 1.1.40 
  • juggler/trunk/modules/vapor/VERSION

    r19808 r19810  
     11.1.41-0 @02/13/2007 23:15:00 UTC@ 
    121.1.40-0 @02/13/2007 21:40:00 UTC@ 
    231.1.39-0 @01/30/2007 22:30:00 UTC@ 
  • juggler/trunk/vc7/VPR/VPR.vcproj

    r19793 r19810  
    154154                        </File> 
    155155                        <File 
    156                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\CondVarNSPR.cpp"> 
     156                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\CondVarWin32.cpp"> 
    157157                        </File> 
    158158                        <File 
     
    175175                        </File> 
    176176                        <File 
    177                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Util\ErrorImplNSPR.cpp"> 
     177                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Util\ErrorImplWin32.cpp"> 
    178178                        </File> 
    179179                        <File 
     
    229229                        </File> 
    230230                        <File 
    231                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\MutexNSPR.cpp"> 
     231                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\MutexWin32.cpp"> 
    232232                        </File> 
    233233                        <File 
     
    259259                        </File> 
    260260                        <File 
    261                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\RWMutexNSPR.cpp"> 
    262                         </File> 
    263                         <File 
    264261                                RelativePath="..\..\modules\vapor\vpr\md\NSPR\IO\SelectorImplNSPR.cpp"> 
    265262                        </File> 
    266263                        <File 
     264                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\SemaphoreWin32.cpp"> 
     265                        </File> 
     266                        <File 
    267267                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\IO\Port\SerialPortImplWin32.cpp"> 
    268268                        </File> 
     
    307307                        </File> 
    308308                        <File 
    309                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadKeyNSPR.cpp"> 
    310                         </File> 
    311                         <File 
    312                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadKeyNSPR.cpp"> 
     309                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadKeyWin32.cpp"> 
    313310                        </File> 
    314311                        <File 
     
    316313                        </File> 
    317314                        <File 
    318                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadNSPR.cpp"> 
    319                         </File> 
    320                         <File 
    321315                                RelativePath="..\..\modules\vapor\vpr\Thread\ThreadPool.cpp"> 
    322316                        </File> 
    323317                        <File 
     318                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadWin32.cpp"> 
     319                        </File> 
     320                        <File 
    324321                                RelativePath="..\..\modules\vapor\vpr\IO\TimeoutException.cpp"> 
    325322                        </File> 
     
    340337                        </File> 
    341338                        <File 
     339                                RelativePath="..\..\modules\vapor\vpr\vprmain.cpp"> 
     340                        </File> 
     341                        <File 
    342342                                RelativePath="..\..\modules\vapor\vpr\IO\WouldBlockException.cpp"> 
    343343                        </File> 
     
    347347                        <File 
    348348                                RelativePath="..\..\modules\vapor\vpr\IO\XMLObjectWriter.cpp"> 
    349                         </File> 
    350                         <File 
    351                                 RelativePath="..\..\modules\vapor\vpr\vprmain.cpp"> 
    352349                        </File> 
    353350                </Filter> 
     
    389386                        </File> 
    390387                        <File 
    391                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\CondVarNSPR.h"> 
     388                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\CondVarWin32.h"> 
    392389                        </File> 
    393390                        <File 
     
    422419                        </File> 
    423420                        <File 
    424                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Util\ErrorImplNSPR.h"> 
     421                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Util\ErrorImplWin32.h"> 
    425422                        </File> 
    426423                        <File 
     
    512509                        </File> 
    513510                        <File 
    514                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\MutexNSPR.h"> 
     511                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\MutexWin32.h"> 
    515512                        </File> 
    516513                        <File 
     
    557554                        </File> 
    558555                        <File 
    559                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\RWMutexNSPR.h"> 
    560                         </File> 
    561                         <File 
    562556                                RelativePath="..\..\modules\vapor\vpr\Util\SampleLimitedStatCollector.h"> 
    563557                        </File> 
     
    578572                        </File> 
    579573                        <File 
    580                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\SemaphoreNSPR.h"> 
     574                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\SemaphoreWin32.h"> 
    581575                        </File> 
    582576                        <File 
     
    677671                        </File> 
    678672                        <File 
    679                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadKeyNSPR.h"> 
     673                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadKeyWin32.h"> 
    680674                        </File> 
    681675                        <File 
     
    683677                        </File> 
    684678                        <File 
    685                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadNSPR.h"> 
    686                         </File> 
    687                         <File 
    688679                                RelativePath="..\..\modules\vapor\vpr\Thread\ThreadPool.h"> 
     680                        </File> 
     681                        <File 
     682                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadWin32.h"> 
    689683                        </File> 
    690684                        <File 
  • juggler/trunk/vc7/VPR/vpr/vprDefines.h

    r19729 r19810  
    114114#endif 
    115115 
     116#define VPR_USE_WINTHREADS 
     117 
    116118/* Define if using the Netscape Portable Runtime. */ 
    117119#define VPR_USE_NSPR  
  • juggler/trunk/vc8/VPR/VPR.vcproj

    r19785 r19810  
    408408                        </File> 
    409409                        <File 
    410                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\CondVarNSPR.cpp" 
     410                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\CondVarWin32.cpp" 
    411411                                > 
    412412                        </File> 
     
    436436                        </File> 
    437437                        <File 
    438                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Util\ErrorImplNSPR.cpp" 
     438                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Util\ErrorImplWin32.cpp" 
    439439                                > 
    440440                        </File> 
     
    508508                        </File> 
    509509                        <File 
    510                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\MutexNSPR.cpp" 
     510                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\MutexWin32.cpp" 
    511511                                > 
    512512                        </File> 
     
    548548                        </File> 
    549549                        <File 
    550                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\RWMutexNSPR.cpp" 
    551                                 > 
    552                         </File> 
    553                         <File 
    554550                                RelativePath="..\..\modules\vapor\vpr\md\NSPR\IO\SelectorImplNSPR.cpp" 
    555551                                > 
    556552                        </File> 
    557553                        <File 
     554                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\SemaphoreWin32.cpp" 
     555                                > 
     556                        </File> 
     557                        <File 
    558558                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\IO\Port\SerialPortImplWin32.cpp" 
    559559                                > 
     
    612612                        </File> 
    613613                        <File 
    614                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadKeyNSPR.cpp" 
     614                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadKeyWin32.cpp" 
    615615                                > 
    616616                        </File> 
     
    620620                        </File> 
    621621                        <File 
    622                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadNSPR.cpp" 
    623                                 > 
    624                         </File> 
    625                         <File 
    626622                                RelativePath="..\..\modules\vapor\vpr\Thread\ThreadPool.cpp" 
     623                                > 
     624                        </File> 
     625                        <File 
     626                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadWin32.cpp" 
    627627                                > 
    628628                        </File> 
     
    717717                        </File> 
    718718                        <File 
    719                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\CondVarNSPR.h" 
     719                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\CondVarWin32.h" 
    720720                                > 
    721721                        </File> 
     
    761761                        </File> 
    762762                        <File 
    763                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Util\ErrorImplNSPR.h" 
     763                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Util\ErrorImplWin32.h" 
    764764                                > 
    765765                        </File> 
     
    881881                        </File> 
    882882                        <File 
    883                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\MutexNSPR.h" 
     883                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\MutexWin32.h" 
    884884                                > 
    885885                        </File> 
     
    941941                        </File> 
    942942                        <File 
    943                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\RWMutexNSPR.h" 
    944                                 > 
    945                         </File> 
    946                         <File 
    947943                                RelativePath="..\..\modules\vapor\vpr\Util\SampleLimitedStatCollector.h" 
    948944                                > 
     
    969965                        </File> 
    970966                        <File 
    971                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Sync\SemaphoreNSPR.h" 
     967                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Sync\SemaphoreWin32.h" 
    972968                                > 
    973969                        </File> 
     
    11011097                        </File> 
    11021098                        <File 
    1103                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadKeyNSPR.h" 
     1099                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadKeyWin32.h" 
    11041100                                > 
    11051101                        </File> 
     
    11091105                        </File> 
    11101106                        <File 
    1111                                 RelativePath="..\..\modules\vapor\vpr\md\NSPR\Thread\ThreadNSPR.h" 
    1112                                 > 
    1113                         </File> 
    1114                         <File 
    11151107                                RelativePath="..\..\modules\vapor\vpr\Thread\ThreadPool.h" 
     1108                                > 
     1109                        </File> 
     1110                        <File 
     1111                                RelativePath="..\..\modules\vapor\vpr\md\WIN32\Thread\ThreadWin32.h" 
    11161112                                > 
    11171113                        </File> 
  • juggler/trunk/vc8/VPR/vpr/vprDefines.h

    r19729 r19810  
    114114#endif 
    115115 
     116#define VPR_USE_WINTHREADS 
     117 
    116118/* Define if using the Netscape Portable Runtime. */ 
    117119#define VPR_USE_NSPR