Changeset 436 for WizardsToolkit/trunk

Show
Ignore:
Timestamp:
10/23/09 12:00:26 (4 weeks ago)
Author:
cristy
Message:
 
Location:
WizardsToolkit/trunk/wizard
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • WizardsToolkit/trunk/wizard/semaphore.c

    r411 r436  
    8282  semaphore_mutex = 0; 
    8383#endif 
    84  
    85 static WizardBooleanType 
    86   instantiate_semaphore = WizardFalse; 
    8784 
    8885/* 
     
    199196%                                                                             % 
    200197%                                                                             % 
    201 %   D e s t r o y S e m a p h o r e                                           % 
    202 %                                                                             % 
    203 %                                                                             % 
    204 %                                                                             % 
    205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    206 % 
    207 %  DestroySemaphore() destroys the semaphore environment. 
    208 % 
    209 %  The format of the DestroySemaphore method is: 
    210 % 
    211 %      DestroySemaphore(void) 
    212 % 
    213 */ 
    214 WizardExport void DestroySemaphore(void) 
     198%   D e s t r o y S e m a p h o r e C o m p o n e n t                         % 
     199%                                                                             % 
     200%                                                                             % 
     201%                                                                             % 
     202%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     203% 
     204%  DestroySemaphoreComponent() destroys the semaphore environment. 
     205% 
     206%  The format of the DestroySemaphoreComponent method is: 
     207% 
     208%      DestroySemaphoreComponent(void) 
     209% 
     210*/ 
     211WizardExport void DestroySemaphoreComponent(void) 
    215212{ 
    216213#if defined(WIZARDSTOOLKIT_HAVE_PTHREAD) 
     
    218215    (void) fprintf(stderr,"pthread_mutex_destroy failed %s\n", 
    219216      GetExceptionMessage(errno)); 
    220 #elif defined(WIZARDSTOOLKIT_HAVE_WINTHREADS) 
    221   if (instantiate_semaphore == WizardFalse) 
    222     DeleteCriticalSection(&semaphore_mutex); 
    223 #endif 
    224   instantiate_semaphore=WizardFalse; 
     217#endif 
    225218} 
    226219 
     
    268261%                                                                             % 
    269262%                                                                             % 
    270 %   I n s t a n t i a t e S e m a p h o r e                                   % 
    271 %                                                                             % 
    272 %                                                                             % 
    273 %                                                                             % 
    274 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    275 % 
    276 %  InstantiateSemaphore() instantiates the semaphore environment. 
    277 % 
    278 %  The format of the InstantiateSemaphore method is: 
     263%   I n s t a n t i a t e S e m a p h o r e C o m p o n e n t                 % 
     264%                                                                             % 
     265%                                                                             % 
     266%                                                                             % 
     267%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     268% 
     269%  InstantiateSemaphoreComponent() instantiates the semaphore component. 
     270% 
     271%  The format of the InstantiateSemaphoreComponent method is: 
    279272% 
    280273%      WizardBooleanType InstantiateSemaphore(void) 
    281274% 
    282275*/ 
    283 WizardExport WizardBooleanType InstantiateSemaphore(void) 
     276WizardExport WizardBooleanType InstantiateSemaphoreComponent(void) 
    284277{ 
    285278  LockWizardMutex(); 
     
    314307      GetExceptionMessage(errno)); 
    315308#elif defined(WIZARDSTOOLKIT_HAVE_WINTHREADS) 
    316   if (instantiate_semaphore == WizardFalse) 
    317     InitializeCriticalSection(&semaphore_mutex); 
    318   instantiate_semaphore=WizardTrue; 
    319309  while (InterlockedCompareExchange(&semaphore_mutex,1L,0L) != 0) 
    320310    Sleep(10); 
  • WizardsToolkit/trunk/wizard/semaphore.h

    r411 r436  
    3131extern WizardExport void 
    3232  AcquireSemaphoreInfo(SemaphoreInfo **), 
    33   DestroySemaphore(void), 
     33  DestroySemaphoreComponent(void), 
    3434  DestroySemaphoreInfo(SemaphoreInfo **), 
    3535  RelinquishSemaphoreInfo(SemaphoreInfo *); 
    3636 
    3737extern WizardExport WizardBooleanType 
    38   InstantiateSemaphore(void), 
     38  InstantiateSemaphoreComponent(void), 
    3939  LockSemaphoreInfo(SemaphoreInfo *), 
    4040  UnlockSemaphoreInfo(SemaphoreInfo *); 
  • WizardsToolkit/trunk/wizard/wizard.c

    r415 r436  
    315315%      WizardsToolkitTerminus(void) 
    316316% 
    317 % 
    318317*/ 
    319318WizardExport void WizardsToolkitTerminus(void) 
     
    323322  DestroyRandomComponent(); 
    324323  DestroyLogComponent(); 
    325 } 
     324  DestroySemaphoreComponent(); 
     325}