Skip to content

Commit

Permalink
tests/xtimer_drift: increase priority of worker
Browse files Browse the repository at this point in the history
When the slacker threads and the worker thread have the same priority
the drift and jitter depend on the workload.
Timer set before the worker thread will be fired before the worker and so
the result is not the timings the system might reach when proper priority
is set. Increasing the priority of the worker thread ensures that the
measureed timings are the achievable timings.
  • Loading branch information
Josar committed Nov 15, 2018
1 parent 836fe3d commit ccbb294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/xtimer_drift/main.c
Expand Up @@ -163,7 +163,7 @@ int main(void)

/* create and trigger worker thread */
kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
THREAD_PRIORITY_MAIN - 1,
THREAD_PRIORITY_MAIN - 2,
THREAD_CREATE_STACKTEST,
worker_thread, NULL, "worker");

Expand Down

0 comments on commit ccbb294

Please sign in to comment.