mirror of
				git://erdgeist.org/opentracker
				synced 2025-11-04 03:43:23 +08:00 
			
		
		
		
	Locks tested. Got the test routine wrong -> Fixed.
This commit is contained in:
		
							parent
							
								
									a6b8311812
								
							
						
					
					
						commit
						3bf7878833
					
				
							
								
								
									
										2
									
								
								mutex.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mutex.c
									
									
									
									
									
								
							@ -53,7 +53,7 @@ static void bucket_remove( int bucket ) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void mutex_bucket_lock( int bucket ) {
 | 
					void mutex_bucket_lock( int bucket ) {
 | 
				
			||||||
  pthread_mutex_lock( &bucket_mutex );
 | 
					  pthread_mutex_lock( &bucket_mutex );
 | 
				
			||||||
  while( !bucket_check( bucket ) )
 | 
					  while( bucket_check( bucket ) )
 | 
				
			||||||
    pthread_cond_wait( &bucket_being_unlocked, &bucket_mutex );
 | 
					    pthread_cond_wait( &bucket_being_unlocked, &bucket_mutex );
 | 
				
			||||||
  bucket_push( bucket );
 | 
					  bucket_push( bucket );
 | 
				
			||||||
  pthread_mutex_unlock( &bucket_mutex );
 | 
					  pthread_mutex_unlock( &bucket_mutex );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user