[Aggregator] free_request_list(): semaphore unneeded

free_request_list() is called by main() after threads' shutdown, so we
do not need to use a semaphore.
This commit is contained in:
Matteo Cypriani 2011-06-10 17:20:37 +02:00
parent 533936c4ee
commit 3d46d64a19
1 changed files with 4 additions and 4 deletions

View File

@ -825,14 +825,14 @@ void got_request(owl_captured_request request)
/*
* Empties the request list.
* Note that this function does not use lock_requests, so it should not
* be called in a concurrent context.
*/
void free_request_list()
{
request_list *next_request ;
request_info_list *next_request_info ;
sem_wait(&lock_requests) ;
while (requests != NULL)
{
while (requests->info != NULL)
@ -845,8 +845,6 @@ void free_request_list()
free(requests) ;
requests = next_request ;
}
sem_post(&lock_requests) ;
}
@ -1157,6 +1155,8 @@ void order_send(ap_list *ap)
/*
* Empties the AP list.
* Note that this function does not use lock_aps, so it should not
* be called in a concurrent context.
*/
void free_ap_list()
{