projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c10a445
)
Don't unlock and lock the thread mutex unnecessarily.
author
Andre Noll
<maan@systemlinux.org>
Mon, 3 Feb 2014 19:45:15 +0000
(20:45 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Sun, 6 Apr 2014 06:53:26 +0000
(08:53 +0200)
ao_write.c
patch
|
blob
|
history
diff --git
a/ao_write.c
b/ao_write.c
index d1d62a6d9d3c3f0f0acdf25ccfa8d7224b8f2eeb..5c14aa719af937a4aba4a3a8efd62078c86bef6d 100644
(file)
--- a/
ao_write.c
+++ b/
ao_write.c
@@
-367,10
+367,10
@@
static int aow_post_select(__a_unused struct sched *s,
goto remove_thread_btrn;
}
}
- pthread_mutex_unlock(&pawd->mutex);
- if (ret >= 0)
+ if (ret >= 0) {
+ pthread_mutex_unlock(&pawd->mutex);
goto out;
- pthread_mutex_lock(&pawd->mutex);
+ }
btr_remove_node(&wn->btrn);
pthread_cond_signal(&pawd->data_available);
pthread_mutex_unlock(&pawd->mutex);