Changeset 8600

Show
Ignore:
Timestamp:
10/27/10 17:20:09 (3 years ago)
Author:
bligon
Message:

In function dbpf_sync_context_destroy(), helgrind was complaining that we shouldn't
try to destory a mutex after it's been locked. So, I added an unlock before the
destroy.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/src/io/trove/trove-dbpf/dbpf-sync.c

    r7548 r8600  
    9191    for(c=0; c < COALESCE_CONTEXT_LAST; c++) 
    9292    { 
     93        /* grab lock...should be the last one, since we are shutting down */ 
    9394        gen_mutex_lock(&sync_array[c][context_index].mutex); 
     95       
     96        /* we have to unlock the mutex before we can destroy it */ 
     97        gen_mutex_unlock(&sync_array[c][context_index].mutex); 
     98 
     99        /* destroy the mutex */ 
    94100        gen_mutex_destroy(&sync_array[c][context_index].mutex); 
     101 
     102        /* cleanup the op queue */ 
    95103        dbpf_op_queue_cleanup(sync_array[c][context_index].sync_queue); 
    96104    }