aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor_posix.h')
-rw-r--r--executor/executor_posix.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/executor/executor_posix.h b/executor/executor_posix.h
index e75bfb3a7..e9b06b807 100644
--- a/executor/executor_posix.h
+++ b/executor/executor_posix.h
@@ -23,17 +23,10 @@ struct event_t {
void event_init(event_t* ev)
{
- // Akaros crashes on NULL attr.
- pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- if (pthread_mutex_init(&ev->mu, &attr))
+ if (pthread_mutex_init(&ev->mu, 0))
fail("pthread_mutex_init failed");
- pthread_mutexattr_destroy(&attr);
- pthread_condattr_t cvattr;
- pthread_condattr_init(&cvattr);
- if (pthread_cond_init(&ev->cv, &cvattr))
+ if (pthread_cond_init(&ev->cv, 0))
fail("pthread_cond_init failed");
- pthread_condattr_destroy(&cvattr);
ev->state = false;
}