From: Vincent Guittot vincent.guittot@linaro.org
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org --- src/rt-app.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/rt-app.c b/src/rt-app.c index 0c11c72..235c622 100644 --- a/src/rt-app.c +++ b/src/rt-app.c @@ -270,19 +270,6 @@ void *thread_body(void *arg) } }
- if (data->wait_before_start > 0) { - log_notice("[%d] Waiting %ld usecs... ", data->ind, - data->wait_before_start); - clock_gettime(CLOCK_MONOTONIC, &t_now); - t_next = usec_to_timespec(data->wait_before_start); - t_next = timespec_add(&t_now, &t_next); - clock_nanosleep(CLOCK_MONOTONIC, - TIMER_ABSTIME, - &t_next, - NULL); - log_notice("[%d] Starting...", data->ind); - } - /* if we know the duration we can calculate how many periods we will * do at most, and the log to memory, instead of logging to file. */ @@ -299,6 +286,20 @@ void *thread_body(void *arg) "\t\tend\t\tdeadline\tdur.\tslack" "\tBudget\tUsed Budget\n");
+ + if (data->wait_before_start > 0) { + log_notice("[%d] Waiting %ld usecs... ", data->ind, + data->wait_before_start); + clock_gettime(CLOCK_MONOTONIC, &t_now); + t_next = usec_to_timespec(data->wait_before_start); + t_next = timespec_add(&t_now, &t_next); + clock_nanosleep(CLOCK_MONOTONIC, + TIMER_ABSTIME, + &t_next, + NULL); + log_notice("[%d] Starting...", data->ind); + } + #ifdef DLSCHED /* TODO find a better way to handle that constraint */ /*