File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed 
tests/regression/60-doublelocking Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 55#include <unistd.h> 
66#include  <assert.h> 
77
8- #ifdef  __APPLE__ 
9-     // OS X does not have PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP 
10-     int  main (int  argc , char  const  * argv [])
11-     {
12-         return  0 ;
13-     }
14- #else 
158
169int  g ;
1710
1811pthread_mutex_t  mut  =  PTHREAD_MUTEX_INITIALIZER ;
12+ 
13+ #ifndef  __APPLE__ 
1914pthread_mutex_t  mut2  =  PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ;
15+ #endif 
16+ 
2017
2118void *  f1 (void *  ptr ) {
2219    int  top ;
@@ -39,11 +36,12 @@ int main(int argc, char const *argv[])
3936    pthread_create (& t1 ,NULL ,f1 ,NULL );
4037    pthread_join (t1 , NULL );
4138
39+ #ifndef  __APPLE__ 
4240    pthread_mutex_lock (& mut2 ); //NOWARN 
4341    pthread_mutex_lock (& mut2 ); //NOWARN 
4442    pthread_mutex_unlock (& mut2 );
4543    pthread_mutex_unlock (& mut2 );
44+ #endif 
4645
4746    return  0 ;
4847}
49- #endif 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments