aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/notify.c13
-rw-r--r--src/notify.h2
2 files changed, 6 insertions, 9 deletions
diff --git a/src/notify.c b/src/notify.c
index 9a3ac500a..4f8a0d296 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -17,24 +17,21 @@
*/
#include "notify.h"
+#include "log.h"
-int notify_init(struct notify *notify)
+void notify_init(struct notify *notify)
{
int ret;
ret = pthread_mutex_init(&notify->mutex, NULL);
if (ret != 0)
- return ret;
+ FATAL("pthread_mutex_init() failed");
ret = pthread_cond_init(&notify->cond, NULL);
- if (ret != 0) {
- pthread_mutex_destroy(&notify->mutex);
- return ret;
- }
+ if (ret != 0)
+ FATAL("pthread_mutex_init() failed");
notify->pending = 0;
-
- return 0;
}
void notify_enter(struct notify *notify)
diff --git a/src/notify.h b/src/notify.h
index a246f663a..0f3b4c1bc 100644
--- a/src/notify.h
+++ b/src/notify.h
@@ -27,7 +27,7 @@ typedef struct notify {
int pending;
} Notify;
-int notify_init(struct notify *notify);
+void notify_init(struct notify *notify);
/**
* The thread which shall be notified by this object must call this