libresman

diff src/resman.c @ 20:c6073bf9fd38

finally! async loading works. Now on to inotify...
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 12 Feb 2014 16:02:12 +0200
parents 2fcd1fbb0d18
children fe0dbdfbe403
line diff
     1.1 --- a/src/resman.c	Wed Feb 12 06:54:52 2014 +0200
     1.2 +++ b/src/resman.c	Wed Feb 12 16:02:12 2014 +0200
     1.3 @@ -166,10 +166,8 @@
     1.4  			continue;
     1.5  		}
     1.6  
     1.7 -		printf("locking mutex %d\n", res->id);
     1.8  		pthread_mutex_lock(&res->done_lock);
     1.9  		if(!res->done_pending) {
    1.10 -			printf("  unlocking mutex %d\n", res->id);
    1.11  			pthread_mutex_unlock(&res->done_lock);
    1.12  			continue;
    1.13  		}
    1.14 @@ -178,12 +176,10 @@
    1.15  		res->done_pending = 0;
    1.16  		if(rman->done_func(i, rman->done_func_cls) == -1) {
    1.17  			/* done-func returned -1, so let's remove the resource */
    1.18 -			printf("  unlocking mutex %d\n", res->id);
    1.19  			pthread_mutex_unlock(&res->done_lock);
    1.20  			remove_resource(rman, i);
    1.21  			continue;
    1.22  		}
    1.23 -		printf("  unlocking mutex %d\n", res->id);
    1.24  		pthread_mutex_unlock(&res->done_lock);
    1.25  	}
    1.26  	return 0;
    1.27 @@ -309,9 +305,7 @@
    1.28  		return;
    1.29  	}
    1.30  
    1.31 -	printf("locking mutex %d\n", res->id);
    1.32  	pthread_mutex_lock(&res->done_lock);
    1.33  	res->done_pending = 1;
    1.34 -	printf("  unlocking mutex %d\n", res->id);
    1.35  	pthread_mutex_unlock(&res->done_lock);
    1.36  }