aboutsummaryrefslogtreecommitdiffstats
path: root/src/condition.c
diff options
context:
space:
mode:
authorThomas Jansen <mithi@mithi.net>2008-12-28 21:01:03 +0100
committerThomas Jansen <mithi@mithi.net>2008-12-28 21:01:03 +0100
commitf31b4f46e17f2af17b4d6549d16e8f111b21688d (patch)
tree3d9a90341832af7eecb991eafdc22a6782c35004 /src/condition.c
parent1914e114664e119434d080440622615e5d18b2a8 (diff)
downloadmpd-f31b4f46e17f2af17b4d6549d16e8f111b21688d.tar.gz
mpd-f31b4f46e17f2af17b4d6549d16e8f111b21688d.tar.xz
mpd-f31b4f46e17f2af17b4d6549d16e8f111b21688d.zip
Remove xpthread_* wrappers
Diffstat (limited to 'src/condition.c')
-rw-r--r--src/condition.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/condition.c b/src/condition.c
index c1fe8ed18..b23bed51e 100644
--- a/src/condition.c
+++ b/src/condition.c
@@ -26,8 +26,11 @@
void cond_init(struct condition *cond)
{
- xpthread_mutex_init(&cond->mutex, NULL);
- xpthread_cond_init(&cond->cond, NULL);
+ int err;
+ if ((err = pthread_mutex_init(&cond->mutex, NULL)))
+ FATAL("failed to init mutex: %s\n", strerror(err));
+ if ((err = pthread_cond_init(&cond->cond, NULL)))
+ FATAL("failed to init cond: %s\n", strerror(err));
}
void cond_enter(struct condition *cond)
@@ -82,6 +85,9 @@ void cond_signal_sync(struct condition *cond)
void cond_destroy(struct condition *cond)
{
- xpthread_cond_destroy(&cond->cond);
- xpthread_mutex_destroy(&cond->mutex);
+ int err;
+ if ((err = pthread_cond_destroy(&cond->cond)))
+ FATAL("failed to destroy cond: %s\n", strerror(err));
+ if ((err = pthread_mutex_destroy(&cond->mutex)))
+ FATAL("failed to destroy mutex: %s\n", strerror(err));
}