Database/server.c
void client_control_wait() {
    // TODO: Block the calling thread until the main thread calls
    // client_control_release(). See the client_control_t struct.
	pthread_mutex_lock (&(cct.go_mutex));
	while(cct.stopped != 0) {
		pthread_cond_wait (&(cct.go),&(cct.go_mutex));
	}
	pthread_mutex_unlock (&(cct.go_mutex));
}
// Called by client threads to wait until progress is permitted
Called by client threads to wait until progress is permitted
Called by client threads to wait until progress is permitted
void client_control_wait() {
	pthread_mutex_lock (&(cct.go_mutex));
	while(cct.stopped != 0) {
		pthread_cond_wait (&(cct.go),&(cct.go_mutex));
	}
	pthread_mutex_unlock (&(cct.go_mutex));
}
void client_control_wait ( ) { pthread_mutex_lock ( & ( cct . go_mutex ) ) ; while ( cct . stopped != 0 ) { pthread_cond_wait ( & ( cct . go ) , & ( cct . go_mutex ) ) ; } pthread_mutex_unlock ( & ( cct . go_mutex ) ) ; }
Called by client threads to wait until progress is permitted
Called by client threads to wait until progress is permitted
// TODO: Block the calling thread until the main thread calls // client_control_release(). See the client_control_t struct.