From bb146866c04bc942242a53d110716f161519a721 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 17 Oct 2017 10:57:38 +0200 Subject: executor: improvements for akaros 1. remove workaround for pthread attrs (was fixed in akaros) 2. remove workaround for dup2 (was fixed in akaros) 3. check that we receive a program 4. implement timeout for test processes --- executor/executor_posix.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'executor/executor_posix.h') 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; } -- cgit mrf-deployment