src/cdrom/macosx/SDLOSXCAGuard.h
changeset 1487 dc6b59e925a2
parent 1402 d910939febfa
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
     1.1 --- a/src/cdrom/macosx/SDLOSXCAGuard.h	Wed Mar 08 18:30:12 2006 +0000
     1.2 +++ b/src/cdrom/macosx/SDLOSXCAGuard.h	Thu Mar 09 06:33:21 2006 +0000
     1.3 @@ -69,41 +69,41 @@
     1.4  #if !defined(__CAGuard_h__)
     1.5  #define __CAGuard_h__
     1.6  
     1.7 -//=============================================================================
     1.8 -//  Includes
     1.9 -//=============================================================================
    1.10 +/*=============================================================================
    1.11 +    Includes
    1.12 +  =============================================================================*/
    1.13  
    1.14  #include <CoreAudio/CoreAudioTypes.h>
    1.15  #include <pthread.h>
    1.16  
    1.17  
    1.18 -//=============================================================================
    1.19 -//  CAGuard
    1.20 -//
    1.21 -//  This is your typical mutex with signalling implemented via pthreads.
    1.22 -//  Lock() will return true if and only if the guard is locked on that call.
    1.23 -//  A thread that already has the guard will receive 'false' if it locks it
    1.24 -//  again. Use of the stack-based CAGuard::Locker class is highly recommended
    1.25 -//  to properly manage the recursive nesting. The Wait calls with timeouts
    1.26 -//  will return true if and only if the timeout period expired. They will
    1.27 -//  return false if they receive notification any other way.
    1.28 -//=============================================================================
    1.29 +/*=============================================================================
    1.30 +    CAGuard
    1.31 +  
    1.32 +    This is your typical mutex with signalling implemented via pthreads.
    1.33 +    Lock() will return true if and only if the guard is locked on that call.
    1.34 +    A thread that already has the guard will receive 'false' if it locks it
    1.35 +    again. Use of the stack-based CAGuard::Locker class is highly recommended
    1.36 +    to properly manage the recursive nesting. The Wait calls with timeouts
    1.37 +    will return true if and only if the timeout period expired. They will
    1.38 +    return false if they receive notification any other way.
    1.39 +  =============================================================================*/
    1.40  
    1.41  typedef struct S_SDLOSXCAGuard
    1.42  {
    1.43  
    1.44 -//  Construction/Destruction
    1.45 -//public:
    1.46 -//  Actions
    1.47 -//public:
    1.48 +/*  Construction/Destruction */
    1.49 +/*public:*/
    1.50 +/*  Actions */
    1.51 +/*public:*/
    1.52      int     (*Lock)(struct S_SDLOSXCAGuard *cag);
    1.53      void    (*Unlock)(struct S_SDLOSXCAGuard *cag);
    1.54 -    int     (*Try)(struct S_SDLOSXCAGuard *cag, int *outWasLocked);    // returns true if lock is free, false if not
    1.55 +    int     (*Try)(struct S_SDLOSXCAGuard *cag, int *outWasLocked);    /* returns true if lock is free, false if not */
    1.56      void    (*Wait)(struct S_SDLOSXCAGuard *cag);
    1.57      void    (*Notify)(struct S_SDLOSXCAGuard *cag);
    1.58  
    1.59 -//  Implementation
    1.60 -//protected:
    1.61 +/*  Implementation */
    1.62 +/*protected:*/
    1.63      pthread_mutex_t mMutex;
    1.64      pthread_cond_t  mCondVar;
    1.65      pthread_t       mOwner;