]> git.proxmox.com Git - mirror_qemu.git/blobdiff - util/thread-pool.c
bsd-user: style tweak: keyword space (
[mirror_qemu.git] / util / thread-pool.c
index 4ed9b89ab2d9c4e6d805ea47c2b21d16f20c8da9..d763cea505b68575af8e1b39cd95d02caa73801a 100644 (file)
@@ -210,7 +210,7 @@ static void thread_pool_cancel(BlockAIOCB *acb)
 
     trace_thread_pool_cancel(elem, elem->common.opaque);
 
-    qemu_mutex_lock(&pool->lock);
+    QEMU_LOCK_GUARD(&pool->lock);
     if (elem->state == THREAD_QUEUED &&
         /* No thread has yet started working on elem. we can try to "steal"
          * the item from the worker if we can get a signal from the
@@ -225,7 +225,6 @@ static void thread_pool_cancel(BlockAIOCB *acb)
         elem->ret = -ECANCELED;
     }
 
-    qemu_mutex_unlock(&pool->lock);
 }
 
 static AioContext *thread_pool_get_aio_context(BlockAIOCB *acb)